]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Fix for the bug IPAL21796: popup and dialog box name forTransparency consistence
authorana <ana@opencascade.com>
Fri, 10 Dec 2010 07:52:46 +0000 (07:52 +0000)
committerana <ana@opencascade.com>
Fri, 10 Dec 2010 07:52:46 +0000 (07:52 +0000)
src/SMESHGUI/SMESHGUI_TransparencyDlg.cxx
src/SMESHGUI/SMESH_msg_en.ts

index 68a13a4fc06977ea7203631985d5eac1a0438ea8..381e2d21176b6f82ebf6d082e4af7df5d775c8c0 100644 (file)
@@ -87,7 +87,7 @@ SMESHGUI_TransparencyDlg::SMESHGUI_TransparencyDlg( SMESHGUI* theModule )
   GroupC1Layout->setMargin( MARGIN );
 
   TextLabelTransparent = new QLabel( tr( "SMESH_TRANSPARENCY_TRANSPARENT" ), GroupC1 );
-  TextLabelTransparent->setAlignment( Qt::AlignLeft );
+  TextLabelTransparent->setAlignment( Qt::AlignRight );
 
   ValueLab = new QLabel( GroupC1 );
   ValueLab->setAlignment( Qt::AlignCenter );
@@ -95,7 +95,7 @@ SMESHGUI_TransparencyDlg::SMESHGUI_TransparencyDlg( SMESHGUI* theModule )
   QFont fnt = ValueLab->font(); fnt.setBold( true ); ValueLab->setFont( fnt );
 
   TextLabelOpaque = new QLabel( tr( "SMESH_TRANSPARENCY_OPAQUE" ), GroupC1 );
-  TextLabelOpaque->setAlignment( Qt::AlignRight );
+  TextLabelOpaque->setAlignment( Qt::AlignLeft );
 
   Slider1 = new QSlider( Qt::Horizontal, GroupC1 );
   Slider1->setRange( 0, 100 );
@@ -107,9 +107,9 @@ SMESHGUI_TransparencyDlg::SMESHGUI_TransparencyDlg( SMESHGUI* theModule )
   Slider1->setFocusPolicy( Qt::NoFocus );
   Slider1->setMinimumWidth( 300 );
 
-  GroupC1Layout->addWidget( TextLabelTransparent, 0, 0 );
+  GroupC1Layout->addWidget( TextLabelOpaque, 0, 0 );
   GroupC1Layout->addWidget( ValueLab, 0, 1 );
-  GroupC1Layout->addWidget( TextLabelOpaque, 0, 2 );
+  GroupC1Layout->addWidget( TextLabelTransparent, 0, 2 );
   GroupC1Layout->addWidget( Slider1, 1, 0, 1, 3 );
 
   /*************************************************************************/
@@ -198,7 +198,7 @@ void SMESHGUI_TransparencyDlg::SetTransparency()
 {
   if ( myViewWindow ) {
     SUIT_OverrideCursor wc;
-    float opacity = Slider1->value() / 100.;
+    float opacity = ( 100 - Slider1->value() ) / 100.;
 
     SALOME_ListIO aList;
     mySelectionMgr->selectedObjects( aList );
@@ -267,7 +267,7 @@ void SMESHGUI_TransparencyDlg::onSelectionChanged()
     } 
     else {
     }
-    Slider1->setValue( opacity );
+    Slider1->setValue( 100 - opacity );
   }
   ValueHasChanged();
 }
index 18a50ace6a125687d9dd9f57b715b79700abed65..25d9db23715b09c360fddda8e3e76ff2cbf789c5 100644 (file)
@@ -1967,15 +1967,15 @@ add the exported data to its contents?</translation>
         </message>
         <message>
             <source>SMESH_TRANSPARENCY_OPAQUE</source>
-            <translation>---> Opaque</translation>
+            <translation>Opaque &lt;---</translation>
         </message>
         <message>
             <source>SMESH_TRANSPARENCY_TITLE</source>
-            <translation>Change Transparency</translation>
+            <translation>Transparency</translation>
         </message>
         <message>
             <source>SMESH_TRANSPARENCY_TRANSPARENT</source>
-            <translation>Transparent &lt;---</translation>
+            <translation>---> Transparent</translation>
         </message>
         <message>
             <source>SMESH_TRIANGLE</source>