Respect the accessibility settings 88/36888/2
authorPaul Wisbey <p.wisbey@samsung.com>
Mon, 16 Mar 2015 14:45:42 +0000 (14:45 +0000)
committerPaul Wisbey <p.wisbey@samsung.com>
Mon, 23 Mar 2015 10:07:15 +0000 (10:07 +0000)
Change-Id: Ib4b666047d13c3fb4fc5f51bccfe3608c15b85ff

adaptors/common/style-monitor-impl.cpp
adaptors/common/style-monitor-impl.h
adaptors/public-api/adaptor-framework/style-monitor.h
platform-abstractions/tizen/tizen-platform-abstraction.cpp

index a7b87d0..756df14 100644 (file)
@@ -80,8 +80,10 @@ Dali::StyleMonitor StyleMonitor::Get()
 
 StyleMonitor::StyleMonitor(Integration::PlatformAbstraction& platformAbstraction)
 : mPlatformAbstraction(platformAbstraction),
-  mDefaultFontSize(0u)
+  mDefaultFontSize(-1)
 {
+  mPlatformAbstraction.GetDefaultFontDescription( mDefaultFontFamily, mDefaultFontStyle );
+  mDefaultFontSize = mPlatformAbstraction.GetDefaultFontSize();
 }
 
 StyleMonitor::~StyleMonitor()
@@ -112,7 +114,7 @@ std::string StyleMonitor::GetDefaultFontStyle() const
   return mDefaultFontStyle;
 }
 
-unsigned int StyleMonitor::GetDefaultFontSize() const
+int StyleMonitor::GetDefaultFontSize() const
 {
   return mDefaultFontSize;
 }
index b51f4ad..f2aa027 100644 (file)
@@ -80,7 +80,7 @@ public:
   /**
    * @copydoc Dali::StyleMonitor::GetDefaultFontSize() const
    */
-  unsigned int GetDefaultFontSize() const;
+  int GetDefaultFontSize() const;
 
   /**
    * @copydoc Dali::StyleMonitor::GetTheme() const
@@ -123,7 +123,7 @@ private:
   std::string mDefaultFontFamily;        ///< The default font family
   std::string mDefaultFontStyle;         ///< The default font style
   std::string mUserDefinedThemeFilePath; ///< String containing the user defined theme file path
-  unsigned int mDefaultFontSize;         ///< The default accessibility font size e.g. 0 is smallest
+  int mDefaultFontSize;                  ///< The default accessibility font size e.g. 0 is smallest
 };
 
 } // namespace Adaptor
index 8b8fca3..1859b7d 100644 (file)
@@ -111,9 +111,9 @@ public: // Style Information
   /**
    * @brief Retrieves the default font size.
    *
-   * This is an accessibility size, which is mapped to a UI Control specific point-size in stylesheets.
+   * This is an logical size, which is mapped to a UI Control specific point-size in stylesheets.
    * For example if zero the smallest size, this could potentially map to TextLabel point-size 8.
-   * @return The default font size.
+   * @return The default font size, or a negative value if not set.
    */
   int GetDefaultFontSize() const;
 
index f0bded7..e7d2bb0 100644 (file)
@@ -94,7 +94,7 @@ void TizenPlatformAbstraction::GetDefaultFontDescription( std::string& fontFamil
 
 int TizenPlatformAbstraction::GetDefaultFontSize() const
 {
-  int fontSize( 0 );
+  int fontSize( -1 );
 
 #ifndef DALI_PROFILE_UBUNTU
   vconf_get_int( VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, &fontSize );