From d4630e2ef27b06886dd250a7ee941215e0514e8d Mon Sep 17 00:00:00 2001 From: "taeyoon0.lee" Date: Tue, 25 Apr 2017 14:32:32 +0900 Subject: [PATCH 1/1] Revert "[Tizen] SVACE issue resolved" This reverts commit ee96dd22ff6b1bb885c3d350135879ff01267e39. Change-Id: I4815d7a5df64643c68f1741eaecd1bbac65a95a2 --- .../internal/styling/style-manager-impl.cpp | 29 ++++++++++++++-------- dali-toolkit/internal/visuals/visual-base-impl.cpp | 9 +++---- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/dali-toolkit/internal/styling/style-manager-impl.cpp b/dali-toolkit/internal/styling/style-manager-impl.cpp index 98596eb..b38d23b 100644 --- a/dali-toolkit/internal/styling/style-manager-impl.cpp +++ b/dali-toolkit/internal/styling/style-manager-impl.cpp @@ -34,7 +34,7 @@ namespace { -//const char* LANDSCAPE_QUALIFIER = "landscape"; +const char* LANDSCAPE_QUALIFIER = "landscape"; const char* PORTRAIT_QUALIFIER = "portrait"; const char* FONT_SIZE_QUALIFIER = "fontsize"; @@ -295,16 +295,23 @@ bool StyleManager::LoadJSON( Toolkit::Builder builder, const std::string& jsonFi static void CollectQualifiers( std::vector& qualifiersOut ) { // Append the relevant qualifier for orientation - // int orientation = 0; // Get the orientation from the system - /* - //// To Do ///// - Getting orientation from the system, and determine Qualifie LANDSCAPE or PORTRAIT - orientation 0, 180 : PORTRAIT_QUALIFIER (default) - orientation 90, 270 : LANDSCAPE_QUALIFIER - */ - - qualifiersOut.push_back( std::string( PORTRAIT_QUALIFIER ) ); - + int orientation = 0; // Get the orientation from the system + switch( orientation ) + { + case 90: + case 270: + { + qualifiersOut.push_back( std::string( LANDSCAPE_QUALIFIER ) ); + break; + } + case 180: + case 0: // fall through + default: + { + qualifiersOut.push_back( std::string( PORTRAIT_QUALIFIER ) ); + break; + } + } } /** diff --git a/dali-toolkit/internal/visuals/visual-base-impl.cpp b/dali-toolkit/internal/visuals/visual-base-impl.cpp index 8a6f24b..c61aeba 100644 --- a/dali-toolkit/internal/visuals/visual-base-impl.cpp +++ b/dali-toolkit/internal/visuals/visual-base-impl.cpp @@ -490,11 +490,8 @@ void Visual::Base::AnimateProperty( Property::Map map; DoCreatePropertyMap( map ); Property::Value* valuePtr = map.Find( Toolkit::DevelVisual::Property::TYPE ); - int visualType = -1; - if( valuePtr ) - { - valuePtr->Get( visualType ); - } + int visualType; + valuePtr->Get(visualType); if( animator.propertyKey == Toolkit::DevelVisual::Property::MIX_COLOR || animator.propertyKey == MIX_COLOR || @@ -512,7 +509,7 @@ void Visual::Base::AnimateProperty( } else if( mImpl->mRenderer ) { - AnimateRendererProperty( transition, animator ); + AnimateRendererProperty(transition, animator); } } -- 2.7.4