From: mzn Date: Mon, 20 Mar 2006 12:39:05 +0000 (+0000) Subject: Fix for bug IPAL10893. X-Git-Tag: OCC_3_2_0a2_TC~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b1e4b8bfea75871fdcae581e9b8e9cc0799aef5e;p=modules%2Fgui.git Fix for bug IPAL10893. --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 051b1c314..0f2b882a0 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -103,6 +103,7 @@ #include #include #include +#include #define FIRST_HELP_ID 1000000 @@ -965,10 +966,32 @@ void LightApp_Application::addWindow( QWidget* wid, const int flag, const int st if( resourceMgr()->hasValue( "PyConsole", "font" ) ) f = resourceMgr()->fontValue( "PyConsole", "font" ); else - { - f = ( ( PythonConsole* )wid )->font(); - resourceMgr()->setValue( "PyConsole", "font", f ); - } + { + f = ( ( PythonConsole* )wid )->font(); + resourceMgr()->setValue( "PyConsole", "font", f ); + } + + // Try to set one of additional families (if it exists in the font database) + QFontDatabase fdb; + QStringList aDatabaseFamilies = fdb.families(); + + if ( !aDatabaseFamilies.contains(f.family()) && + resourceMgr()->hasValue( "PyConsole", "additional_families" ) ) + { + QStringList anAddFamilies = QStringList::split( ";", resourceMgr()->stringValue( "PyConsole", "additional_families" ) ); + + QString aFamily; + for ( QStringList::Iterator it = anAddFamilies.begin(); it != anAddFamilies.end(); ++it ) + { + aFamily = *it; + if ( !aDatabaseFamilies.contains(aFamily) ) + continue; + + f.setFamily( aFamily ); + resourceMgr()->setValue( "PyConsole", "font", f ); + break; + } + } } else #endif diff --git a/src/LightApp/resources/LightApp.xml b/src/LightApp/resources/LightApp.xml index cab85581e..8bdd61f40 100644 --- a/src/LightApp/resources/LightApp.xml +++ b/src/LightApp/resources/LightApp.xml @@ -38,6 +38,10 @@ +
+ + +
diff --git a/src/SalomeApp/resources/SalomeApp.xml b/src/SalomeApp/resources/SalomeApp.xml index 3fa77b587..fce6608bc 100644 --- a/src/SalomeApp/resources/SalomeApp.xml +++ b/src/SalomeApp/resources/SalomeApp.xml @@ -57,6 +57,7 @@
+