[4.0] add getter/setter for ignoreGlobalFontSizeChanged 51/167851/1 accepted/tizen/4.0/unified/20180123.042141 submit/tizen_4.0/20180123.013215
authorminho.sun <minho.sun@samsung.com>
Mon, 22 Jan 2018 10:05:02 +0000 (19:05 +0900)
committerminho.sun <minho.sun@samsung.com>
Mon, 22 Jan 2018 10:05:02 +0000 (19:05 +0900)
Add getter/setter for ignoreGlobalFontSizeChanged.
And make watch-application always set this option to true.

Change-Id: Iade9f6037c6230c2cdf8108f7896a7a6a7c60309
Signed-off-by: minho.sun <minho.sun@samsung.com>
adaptors/common/style-monitor-impl.cpp
adaptors/common/style-monitor-impl.h
adaptors/devel-api/adaptor-framework/style-monitor.cpp
adaptors/devel-api/adaptor-framework/style-monitor.h
adaptors/wearable/watch-application-impl.cpp

index f85e0b1..a8cc2d8 100644 (file)
@@ -86,7 +86,8 @@ Dali::StyleMonitor StyleMonitor::Get()
 }
 
 StyleMonitor::StyleMonitor()
-: mDefaultFontSize(-1)
+: mDefaultFontSize(-1),
+  mIgnoreGlobalFontSizeChange(-1)
 {
   mFontClient = TextAbstraction::FontClient::Get();
   GetSystemDefaultFontFamily( mFontClient, mDefaultFontFamily );
@@ -171,11 +172,6 @@ bool StyleMonitor::LoadThemeFile( const std::string& filename, std::string& outp
   return retval;
 }
 
-Dali::StyleMonitor::StyleChangeSignalType& StyleMonitor::StyleChangeSignal()
-{
-  return mStyleChangeSignal;
-}
-
 void StyleMonitor::EmitStyleChangeSignal( StyleChange::Type styleChange )
 {
   if( !mStyleChangeSignal.Empty() )
@@ -186,6 +182,21 @@ void StyleMonitor::EmitStyleChangeSignal( StyleChange::Type styleChange )
   }
 }
 
+int StyleMonitor::GetIgnoreGlobalFontSizeChange()
+{
+  return mIgnoreGlobalFontSizeChange;
+}
+
+void StyleMonitor::SetIgnoreGlobalFontSizeChange(int value)
+{
+  mIgnoreGlobalFontSizeChange = value;
+}
+
+Dali::StyleMonitor::StyleChangeSignalType& StyleMonitor::StyleChangeSignal()
+{
+  return mStyleChangeSignal;
+}
+
 } // namespace Adaptor
 
 } // namespace Internal
index 5fffbbe..8d2bf73 100644 (file)
@@ -96,6 +96,16 @@ public:
    */
   bool LoadThemeFile( const std::string& filename, std::string& output );
 
+  /**
+   * @copydoc Dali::StyleMonitor::GetIgnoreGlobalFontSizeChange()
+   */
+  int GetIgnoreGlobalFontSizeChange();
+
+  /**
+   * @copydoc Dali::StyleMonitor::SetIgnoreGlobalFontSizeChange()
+   */
+  void SetIgnoreGlobalFontSizeChange(int value);
+
   // Signals
 
   /**
@@ -127,6 +137,7 @@ private:
   std::string mDefaultFontStyle;         ///< The default font style
   std::string mUserDefinedThemeFilePath; ///< String containing the user defined theme file path
   int mDefaultFontSize;                  ///< The default accessibility font size e.g. 0 is smallest
+  int mIgnoreGlobalFontSizeChange;       ///< Ignore global font size change when it is 1
 };
 
 } // namespace Adaptor
index 4b08a2b..2e1e25a 100644 (file)
@@ -77,6 +77,16 @@ bool StyleMonitor::LoadThemeFile( const std::string& filename, std::string& outp
   return GetImplementation(*this).LoadThemeFile( filename, output );
 }
 
+int StyleMonitor::GetIgnoreGlobalFontSizeChange()
+{
+  return GetImplementation(*this).GetIgnoreGlobalFontSizeChange();
+}
+
+void StyleMonitor::SetIgnoreGlobalFontSizeChange(int value)
+{
+  GetImplementation(*this).SetIgnoreGlobalFontSizeChange( value );
+}
+
 StyleMonitor::StyleChangeSignalType& StyleMonitor::StyleChangeSignal()
 {
   return GetImplementation(*this).StyleChangeSignal();
index bf63048..692fe73 100644 (file)
@@ -142,6 +142,18 @@ public: // Style Information
    */
   bool LoadThemeFile( const std::string& filename, std::string& output );
 
+  /**
+   * Return the value of mIgnoreGlobalFontSizeChange.
+   * @return Return mIgnoreGlobalFontSizeChange.
+   */
+  int GetIgnoreGlobalFontSizeChange();
+
+  /**
+   * Informs the Style Monitor that the style has changed.
+   * @param[in]  value The value of mIgnoreGlobalFontSizeChange.
+   */
+  void SetIgnoreGlobalFontSizeChange(int value);
+
 public: // Signals
 
   /**
index c0fc0e5..0c89bfc 100755 (executable)
@@ -17,6 +17,7 @@
 
 // CLASS HEADER
 #include "watch-application-impl.h"
+#include <style-monitor.h>
 
 namespace Dali
 {
@@ -41,6 +42,7 @@ WatchApplication::WatchApplication( int* argc, char** argv[], const std::string&
 : Application(argc, argv, stylesheet, windowMode, PositionSize(), Framework::WATCH),
   mState( UNINITIALIZED )
 {
+  Dali::StyleMonitor::Get().SetIgnoreGlobalFontSizeChange(1);
 }
 
 WatchApplication::~WatchApplication()