From ee50bc92a2faf23ef47d13106212adae2a6e9e65 Mon Sep 17 00:00:00 2001 From: Paul Wisbey Date: Mon, 18 May 2015 16:17:33 +0100 Subject: [PATCH] Use stylesheet from StyleMonitor Change-Id: I51cfb2b1f4b7eb7a20e4236079156b203a50a947 --- dali-toolkit/internal/styling/style-manager-impl.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/dali-toolkit/internal/styling/style-manager-impl.cpp b/dali-toolkit/internal/styling/style-manager-impl.cpp index 5ab410f..bc249b3 100644 --- a/dali-toolkit/internal/styling/style-manager-impl.cpp +++ b/dali-toolkit/internal/styling/style-manager-impl.cpp @@ -101,13 +101,12 @@ Toolkit::StyleManager StyleManager::Get() StyleManager::StyleManager() : mOrientationDegrees( 0 ), // Portrait - mDefaultFontSize( -1 ) + mDefaultFontSize( -1 ), + mThemeFile( DEFAULT_THEME ) { // Add theme builder constants mThemeBuilderConstants[ PACKAGE_PATH_KEY ] = DEFAULT_PACKAGE_PATH; - RequestDefaultTheme(); - StyleMonitor styleMonitor( StyleMonitor::Get() ); if( styleMonitor ) { @@ -401,6 +400,20 @@ void StyleManager::StyleMonitorChange( StyleMonitor styleMonitor, StyleChange st mDefaultFontSize = styleMonitor.GetDefaultFontSize(); } + if( styleChange.themeChange ) + { + if( ! styleChange.themeFilePath.empty() ) + { + mThemeFile = styleChange.themeFilePath; + } + else + { + mThemeFile = DEFAULT_THEME; + } + + SetTheme(); + } + mStyleChangeSignal.Emit( Toolkit::StyleManager::Get(), styleChange ); } -- 2.7.4