// CLASS HEADER
#include "style-monitor-impl.h"
-// INTERNAL INCLUDES
+// EXTERNAL INCLUDES
#include <dali/public-api/object/type-registry.h>
+
+// INTERNAL INCLUDES
#include <adaptor-impl.h>
#include <singleton-service-impl.h>
}
StyleMonitor::StyleMonitor(Integration::PlatformAbstraction& platformAbstraction)
-: mPlatformAbstraction(platformAbstraction)
+: mPlatformAbstraction(platformAbstraction),
+ mDefaultFontSize(-1)
{
+ mPlatformAbstraction.GetDefaultFontDescription( mDefaultFontFamily, mDefaultFontStyle );
+ mDefaultFontSize = mPlatformAbstraction.GetDefaultFontSize();
}
StyleMonitor::~StyleMonitor()
void StyleMonitor::StyleChanged(StyleChange styleChange)
{
- if (styleChange.defaultFontChange || styleChange.defaultFontSizeChange)
+ if ( styleChange.defaultFontChange )
+ {
+ mPlatformAbstraction.GetDefaultFontDescription( mDefaultFontFamily, mDefaultFontStyle );
+ }
+ if ( styleChange.defaultFontSizeChange )
{
- mPlatformAbstraction.UpdateDefaultsFromDevice();
+ mDefaultFontSize = mPlatformAbstraction.GetDefaultFontSize();
}
EmitStyleChangeSignal(styleChange);
std::string StyleMonitor::GetDefaultFontFamily() const
{
- return mPlatformAbstraction.GetDefaultFontFamily();
+ return mDefaultFontFamily;
+}
+
+std::string StyleMonitor::GetDefaultFontStyle() const
+{
+ return mDefaultFontStyle;
}
-float StyleMonitor::GetDefaultFontSize() const
+int StyleMonitor::GetDefaultFontSize() const
{
- return mPlatformAbstraction.GetDefaultFontSize();
+ return mDefaultFontSize;
}
const std::string& StyleMonitor::GetTheme() const