From 9ee2625ed5ffdd9577408264b2f1d4c46a9a536c Mon Sep 17 00:00:00 2001 From: ana Date: Fri, 10 Dec 2010 07:49:53 +0000 Subject: [PATCH] Fix for the bug IPAL21796: popup and dialog box name forTransparency consistence --- src/VISUGUI/VISU_msg_en.ts | 6 +++--- src/VISUGUI/VisuGUI.cxx | 4 ++-- src/VISUGUI/VisuGUI_ClippingDlg.h | 2 +- src/VISUGUI/VisuGUI_TransparencyDlg.cxx | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/VISUGUI/VISU_msg_en.ts b/src/VISUGUI/VISU_msg_en.ts index 99926d85..0925a2f8 100644 --- a/src/VISUGUI/VISU_msg_en.ts +++ b/src/VISUGUI/VISU_msg_en.ts @@ -904,8 +904,8 @@ Input value precision can be adjusted using Shading Off - MEN_OPACITY - Opacity + MEN_TRANSPARENCY + Transparency MEN_PARALLEL_ANIMATION @@ -3136,7 +3136,7 @@ Please, refer to the QT documentation. TRANSPARENCY_TITLE - Change Transparency + Transparency TRANSPARENCY_TRANSPARENT diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index 5a863079..fec8f110 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -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(), diff --git a/src/VISUGUI/VisuGUI_ClippingDlg.h b/src/VISUGUI/VisuGUI_ClippingDlg.h index a40cd1c0..18daf564 100644 --- a/src/VISUGUI/VisuGUI_ClippingDlg.h +++ b/src/VISUGUI/VisuGUI_ClippingDlg.h @@ -213,6 +213,6 @@ public slots: void ClickOnHelp(); }; -#endif // DIALOGBOX_TRANSPARENCYDLG_H +#endif // DIALOGBOX_CLIPPING_H diff --git a/src/VISUGUI/VisuGUI_TransparencyDlg.cxx b/src/VISUGUI/VisuGUI_TransparencyDlg.cxx index 3890d2b5..c75a248a 100644 --- a/src/VISUGUI/VisuGUI_TransparencyDlg.cxx +++ b/src/VISUGUI/VisuGUI_TransparencyDlg.cxx @@ -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(); } -- 2.39.2