From: vsr Date: Wed, 23 Jun 2010 13:19:50 +0000 (+0000) Subject: Bug IPAL21801: preferences for SMESH: color of Group name text should be added X-Git-Tag: translate_resources_09Jul10~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9862fa66b47bb8194c77775752c25aac30283078;p=modules%2Fsmesh.git Bug IPAL21801: preferences for SMESH: color of Group name text should be added EDF 703 SMESH VISU : Display Mesh Groups names in viewer (as a caption) Additional fix: add preferences for the names groups color --- diff --git a/resources/SalomeApp.xml b/resources/SalomeApp.xml index e4ddfa738..a1806b5cd 100644 --- a/resources/SalomeApp.xml +++ b/resources/SalomeApp.xml @@ -33,6 +33,7 @@ + diff --git a/src/OBJECT/SMESH_Actor.cxx b/src/OBJECT/SMESH_Actor.cxx index cd9e06919..33acca122 100644 --- a/src/OBJECT/SMESH_Actor.cxx +++ b/src/OBJECT/SMESH_Actor.cxx @@ -487,9 +487,11 @@ SMESH_ActorDef::SMESH_ActorDef() myHighlitableActor->SetQuadraticArcAngle(aQuadraticAngle); my2DActor->SetQuadraticArcAngle(aQuadraticAngle); - // Set color of the name actor + // Set colors of the name actor SMESH::GetColor( "SMESH", "fill_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 170, 255 ) ); myNameActor->SetBackgroundColor(anRGB[0], anRGB[1], anRGB[2]); + SMESH::GetColor( "SMESH", "group_name_color", anRGB[0], anRGB[1], anRGB[2], QColor( 255, 255, 255 ) ); + myNameActor->SetForegroundColor(anRGB[0], anRGB[1], anRGB[2]); } diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index fa34a1886..fe6d90e4c 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -3900,6 +3900,11 @@ void SMESHGUI::createPreferences() addPreference( tr( "PREF_BACKFACE" ), elemGroup, LightApp_Preferences::Color, "SMESH", "backface_color" ); addPreference( tr( "PREF_COLOR_0D" ), elemGroup, LightApp_Preferences::Color, "SMESH", "elem0d_color" ); + int grpGroup = addPreference( tr( "PREF_GROUP_GROUPS" ), meshTab ); + setPreferenceProperty( grpGroup, "columns", 2 ); + + addPreference( tr( "PREF_GRP_NAMES" ), grpGroup, LightApp_Preferences::Color, "SMESH", "group_name_color" ); + //int sp = addPreference( "", elemGroup, LightApp_Preferences::Space ); //setPreferenceProperty( sp, "hstretch", 0 ); //setPreferenceProperty( sp, "vstretch", 0 ); diff --git a/src/SMESHGUI/SMESH_msg_en.ts b/src/SMESHGUI/SMESH_msg_en.ts index c75999773..c7ddce707 100644 --- a/src/SMESHGUI/SMESH_msg_en.ts +++ b/src/SMESHGUI/SMESH_msg_en.ts @@ -3313,6 +3313,14 @@ Please, create VTK viewer and try again PREF_GROUP_NODES Nodes + + PREF_GROUP_GROUPS + Groups + + + PREF_GRP_NAMES + Names color + PREF_GROUP_PRECISION Precision