Revert "[Tizen] SVACE issue resolved" 24/126824/1
authortaeyoon0.lee <taeyoon0.lee@samsung.com>
Tue, 25 Apr 2017 05:32:32 +0000 (14:32 +0900)
committertaeyoon0.lee <taeyoon0.lee@samsung.com>
Tue, 25 Apr 2017 05:32:49 +0000 (14:32 +0900)
This reverts commit ee96dd22ff6b1bb885c3d350135879ff01267e39.

Change-Id: I4815d7a5df64643c68f1741eaecd1bbac65a95a2

dali-toolkit/internal/styling/style-manager-impl.cpp
dali-toolkit/internal/visuals/visual-base-impl.cpp

index 98596eb..b38d23b 100644 (file)
@@ -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<std::string>& 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;
+    }
+  }
 }
 
 /**
index 8a6f24b..c61aeba 100644 (file)
@@ -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);
   }
 }