]> SALOME platform Git repositories - modules/visu.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:49:53 +0000 (07:49 +0000)
committerana <ana@opencascade.com>
Fri, 10 Dec 2010 07:49:53 +0000 (07:49 +0000)
src/VISUGUI/VISU_msg_en.ts
src/VISUGUI/VisuGUI.cxx
src/VISUGUI/VisuGUI_ClippingDlg.h
src/VISUGUI/VisuGUI_TransparencyDlg.cxx

index 99926d85211a7243c3a4e861268c6e7665bce92e..0925a2f899fbb8b207822a230e35e73766feaa5a 100644 (file)
@@ -904,8 +904,8 @@ Input value precision can be adjusted using
             <translation>Shading Off</translation>
         </message>
         <message>
-            <source>MEN_OPACITY</source>
-            <translation>Opacity</translation>
+            <source>MEN_TRANSPARENCY</source>
+            <translation>Transparency</translation>
         </message>
         <message>
             <source>MEN_PARALLEL_ANIMATION</source>
@@ -3136,7 +3136,7 @@ Please, refer to the QT documentation.</translation>
         </message>
         <message>
             <source>TRANSPARENCY_TITLE</source>
-            <translation>Change Transparency</translation>
+            <translation>Transparency</translation>
         </message>
         <message>
             <source>TRANSPARENCY_TRANSPARENT</source>
index 5a8630799704ff5527d7f5374b5f77d422f98b95..fec8f110c4435a25eba9bf7d0e5c99239273efec 100644 (file)
@@ -2784,8 +2784,8 @@ VisuGUI
                 tr("MEN_EDGE_COLOR"), "", 0, aParent, false,
                 this, SLOT(OnChangeWireframeColor()));
 
-  createAction( VISU_OPACITY, tr("MEN_OPACITY"), QIcon(),
-                tr("MEN_OPACITY"), "", 0, aParent, false,
+  createAction( VISU_OPACITY, tr("MEN_TRANSPARENCY"), QIcon(),
+                tr("MEN_TRANSPARENCY"), "", 0, aParent, false,
                 this, SLOT(OnChangeOpacity()));
 
   createAction( VISU_LINE_WIDTH, tr("MEN_LINE_WIDTH"), QIcon(),
index a40cd1c02dfd382171649781203e695d87f2fd28..18daf564b50981776d7dd8e6452677c1cb8e14e7 100644 (file)
@@ -213,6 +213,6 @@ public slots:
     void ClickOnHelp();
 };
 
-#endif // DIALOGBOX_TRANSPARENCYDLG_H
+#endif // DIALOGBOX_CLIPPING_H
 
 
index 3890d2b5d8156a373e862ad33793831c361940ad..c75a248a592a463ae68f1e38db8e7dcaef9bddde 100644 (file)
@@ -91,8 +91,8 @@ VisuGUI_TransparencyDlg::VisuGUI_TransparencyDlg( VisuGUI* theModule,
   GroupC1Layout->setMargin(11);
 
   TextLabelTransparent = new QLabel(tr("TRANSPARENCY_TRANSPARENT" ), GroupC1);
-  TextLabelTransparent->setAlignment(Qt::AlignLeft);
-  GroupC1Layout->addWidget(TextLabelTransparent, 0, 0);
+  TextLabelTransparent->setAlignment(Qt::AlignRight);
+  GroupC1Layout->addWidget(TextLabelTransparent, 0, 2);
 
   ValueLab = new QLabel(GroupC1);
   ValueLab->setAlignment(Qt::AlignCenter);
@@ -101,8 +101,8 @@ VisuGUI_TransparencyDlg::VisuGUI_TransparencyDlg( VisuGUI* theModule,
   GroupC1Layout->addWidget(ValueLab, 0, 1);
 
   TextLabelOpaque = new QLabel(tr("TRANSPARENCY_OPAQUE" ), GroupC1);
-  TextLabelOpaque->setAlignment(Qt::AlignRight);
-  GroupC1Layout->addWidget(TextLabelOpaque, 0, 2);
+  TextLabelOpaque->setAlignment(Qt::AlignLeft);
+  GroupC1Layout->addWidget(TextLabelOpaque, 0, 1);
 
   Slider1 = new QSlider( Qt::Horizontal, GroupC1 );
   Slider1->setMinimum( 0 );
@@ -206,7 +206,7 @@ void VisuGUI_TransparencyDlg::SetTransparency()
 {
   if( myViewWindow ) {
     SUIT_OverrideCursor wc;
-    float opacity = this->Slider1->value() / 100.;
+    float opacity = (100 - this->Slider1->value() ) / 100.;
 
     SALOME_ListIO aList;
     mySelectionMgr->selectedObjects(aList);
@@ -278,7 +278,7 @@ void VisuGUI_TransparencyDlg::onSelectionChanged()
         opacity = setOp;
     } else {
     }
-    Slider1->setValue(opacity);
+    Slider1->setValue(100 - opacity);
   }
   ValueHasChanged();
 }