]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Bug IPAL21801: preferences for SMESH: color of Group name text should be added
authorvsr <vsr@opencascade.com>
Wed, 23 Jun 2010 13:19:50 +0000 (13:19 +0000)
committervsr <vsr@opencascade.com>
Wed, 23 Jun 2010 13:19:50 +0000 (13:19 +0000)
EDF 703 SMESH VISU : Display Mesh Groups names in viewer (as a caption)
Additional fix: add preferences for the names groups color

resources/SalomeApp.xml
src/OBJECT/SMESH_Actor.cxx
src/SMESHGUI/SMESHGUI.cxx
src/SMESHGUI/SMESH_msg_en.ts

index e4ddfa7381b1f890b88e8fc7a5048fab3e3d804c..a1806b5cd5b6e53bae2db01088519fb2850bfbba 100644 (file)
@@ -33,6 +33,7 @@
     <parameter name="backface_color"               value="0, 0,   255"/>
     <parameter name="elem0d_color"                 value="0, 255,   0"/>
     <parameter name="highlight_color"              value="0, 255, 255"/>
+    <parameter name="group_name_color"             value="255, 255, 255"/>
     <parameter name="type_of_marker"               value="1"  />
     <parameter name="marker_scale"                 value="9"  />
     <parameter name="elem0d_size"                  value="5" />
index cd9e0691967992a98cc2b113fd863498a0c67211..33acca12248303dc2c0eed49e8be11d88cd4f156 100644 (file)
@@ -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]);
 }
 
 
index fa34a188680d8c78ff0ac2400b2dad66dd4a1d07..fe6d90e4cda76118c4ba1ff4a874c5c903e3e697 100644 (file)
@@ -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 );
index c7599977337204084fec88e2382360e087d830b6..c7ddce7073a2e95e54d530482bbde327e45f1c77 100644 (file)
@@ -3313,6 +3313,14 @@ Please, create VTK viewer and try again</translation>
             <source>PREF_GROUP_NODES</source>
             <translation>Nodes</translation>
         </message>
+        <message>
+            <source>PREF_GROUP_GROUPS</source>
+            <translation>Groups</translation>
+        </message>
+        <message>
+            <source>PREF_GRP_NAMES</source>
+            <translation>Names color</translation>
+        </message>
         <message>
             <source>PREF_GROUP_PRECISION</source>
             <translation>Precision</translation>