[4.0] Add ignoreGlobalFontSizeChage to config section. 72/167572/6 accepted/tizen/4.0/unified/20180123.042144 submit/tizen_4.0/20180123.013215
authorminho.sun <minho.sun@samsung.com>
Thu, 18 Jan 2018 08:10:47 +0000 (17:10 +0900)
committerminho.sun <minho.sun@samsung.com>
Mon, 22 Jan 2018 11:29:36 +0000 (20:29 +0900)
Add ignoreGlobalFontSizeChage to config section.

If app wants to ignore global font size change, they can set this value
to true.

By default, the value is false.

Change-Id: Id2cc5d9860ed14b780aad34717cbcf59444540e2
Signed-off-by: minho.sun <minho.sun@samsung.com>
dali-toolkit/internal/styling/style-manager-impl.cpp
dali-toolkit/styles/1920x1080/dali-toolkit-default-theme.json
dali-toolkit/styles/360x360/dali-toolkit-default-theme.json
dali-toolkit/styles/480x800/dali-toolkit-default-theme.json
dali-toolkit/styles/720x1280/dali-toolkit-default-theme.json

index df885d9..f6c4e38 100644 (file)
@@ -119,6 +119,12 @@ StyleManager::StyleManager()
 
   // Sound & haptic style
   mFeedbackStyle = new FeedbackStyle();
+
+  if( mStyleMonitor.GetIgnoreGlobalFontSizeChange() == -1 )
+  {
+    Property::Map config = GetConfigurations();
+    mStyleMonitor.SetIgnoreGlobalFontSizeChange( static_cast<int>(config["ignoreGlobalFontSizeChange"].Get<bool>()) );
+  }
 }
 
 StyleManager::~StyleManager()
@@ -461,22 +467,27 @@ void StyleManager::StyleMonitorChange( StyleMonitor styleMonitor, StyleChange::T
     case StyleChange::DEFAULT_FONT_CHANGE:
     {
       mDefaultFontFamily = styleMonitor.GetDefaultFontFamily();
+      EmitStyleChangeSignals( styleChange );
       break;
     }
 
     case StyleChange::DEFAULT_FONT_SIZE_CHANGE:
     {
-      mDefaultFontSize = styleMonitor.GetDefaultFontSize();
+      if( styleMonitor.GetIgnoreGlobalFontSizeChange() == 0 )
+      {
+        mDefaultFontSize = styleMonitor.GetDefaultFontSize();
+        EmitStyleChangeSignals( styleChange );
+      }
       break;
     }
 
     case StyleChange::THEME_CHANGE:
     {
       SetTheme( styleMonitor.GetTheme() );
+      EmitStyleChangeSignals( styleChange );
       break;
     }
   }
-  EmitStyleChangeSignals( styleChange );
 }
 
 void StyleManager::EmitStyleChangeSignals( StyleChange::Type styleChange )
index 50f9529..6596d3c 100644 (file)
@@ -29,7 +29,8 @@
   "config":
   {
     "alwaysShowFocus":true,
-    "clearFocusOnEscape":false
+    "clearFocusOnEscape":false,
+    "ignoreGlobalFontSizeChange":false
   },
   "styles":
   {
index 735b0e5..a1a8dde 100644 (file)
@@ -19,7 +19,7 @@
 
 //******************************************************************************
 //
-// Default Reference style theme for a 480x800 resolution, The values determined by UX design specification.
+// Default Reference style theme for a 360x360 resolution, The values determined by UX design specification.
 // This file can be copied to a new folder within the styles/ directory and amended with new default values.
 // Can be overriden if StyleManager applies another style sheet.
 //
@@ -29,7 +29,8 @@
   "config":
   {
     "alwaysShowFocus":false,
-    "clearFocusOnEscape":true
+    "clearFocusOnEscape":true,
+    "ignoreGlobalFontSizeChange":false
   },
   "styles":
   {
index 460d0f8..27c52ef 100644 (file)
@@ -29,7 +29,8 @@
   "config":
   {
     "alwaysShowFocus":false,
-    "clearFocusOnEscape":true
+    "clearFocusOnEscape":true,
+    "ignoreGlobalFontSizeChange":false
   },
   "styles":
   {
index 9390546..1ea7683 100644 (file)
@@ -29,7 +29,8 @@
   "config":
   {
     "alwaysShowFocus":false,
-    "clearFocusOnEscape":true
+    "clearFocusOnEscape":true,
+    "ignoreGlobalFontSizeChange":false
   },
   "styles":
   {