-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_TransparencyDlg.cxx
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
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 );
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 );
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 );
/*************************************************************************/
{
if ( myViewWindow ) {
SUIT_OverrideCursor wc;
- float opacity = Slider1->value() / 100.;
+ float opacity = ( 100 - Slider1->value() ) / 100.;
SALOME_ListIO aList;
mySelectionMgr->selectedObjects( aList );
}
else {
}
- Slider1->setValue( opacity );
+ Slider1->setValue( 100 - opacity );
}
ValueHasChanged();
}