From 12103c0efbc495a1064b0ac0ece821b3f3f2d39f Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 31 Oct 2008 15:31:08 +0000 Subject: [PATCH] Improve SALOME style handling --- src/LightApp/resources/LightApp_msg_en.ts | 12 ++++++++++++ src/Session/SALOME_Session_Server.cxx | 17 +++++------------ src/Style/resources/SalomeStyle.xml | 4 ++-- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/LightApp/resources/LightApp_msg_en.ts b/src/LightApp/resources/LightApp_msg_en.ts index 4ec13897c..d5e7a2c18 100644 --- a/src/LightApp/resources/LightApp_msg_en.ts +++ b/src/LightApp/resources/LightApp_msg_en.ts @@ -33,6 +33,18 @@ CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS LightApp_Application + + MEN_DESK_THEME + Theme + + + TOT_THEME + Theme + + + PRP_THEME + Change style properties + INF_TOOLBAR_MODULES Modules diff --git a/src/Session/SALOME_Session_Server.cxx b/src/Session/SALOME_Session_Server.cxx index 26a873857..de4c0822d 100755 --- a/src/Session/SALOME_Session_Server.cxx +++ b/src/Session/SALOME_Session_Server.cxx @@ -61,7 +61,6 @@ #include #include -#include #include #include #include @@ -359,7 +358,8 @@ int main( int argc, char **argv ) // ...create resource manager SUIT_ResourceMgr resMgr( "SalomeApp", QString( "%1Config" ) ); resMgr.setCurrentFormat( "xml" ); - resMgr.loadLanguage( false, "LightApp", "en" ); + resMgr.setWorkingMode( QtxResourceMgr::IgnoreUserValues ); + resMgr.loadLanguage( "LightApp", "en" ); // splash = QtxSplash::splash( QPixmap() ); splash->readSettings( &resMgr ); @@ -534,16 +534,9 @@ int main( int argc, char **argv ) SUIT_Application* aGUIApp = aGUISession->startApplication( "SalomeApp", 0, 0 ); if ( aGUIApp ) { - // Set SALOME style to the application - SUIT_ResourceMgr resMgr( "SalomeApp", QString( "%1Config" ) ); - resMgr.setCurrentFormat( "xml" ); - resMgr.loadLanguage( false, "LightApp", "en" ); - if ( bool isSSUse = resMgr.booleanValue( "Style", "use_salome_style", true ) ) - { - Style_Salome* aStyle = new Style_Salome(); - aStyle->getModel()->initFromResource( aGUIApp->resourceMgr() ); - _qappl.setStyle( aStyle ); - } + Style_Salome::initialize( aGUIApp->resourceMgr() ); + if ( aGUIApp->resourceMgr()->booleanValue( "Style", "use_salome_style", true ) ) + Style_Salome::apply(); if ( !isFound( "noexcepthandler", argc, argv ) ) _qappl.setHandler( aGUISession->handler() ); // after loading SalomeApp application diff --git a/src/Style/resources/SalomeStyle.xml b/src/Style/resources/SalomeStyle.xml index d09cd5fd0..858bf7310 100644 --- a/src/Style/resources/SalomeStyle.xml +++ b/src/Style/resources/SalomeStyle.xml @@ -1,5 +1,5 @@ -
+
@@ -22,7 +22,7 @@
-
+
-- 2.39.2