From: vsr Date: Tue, 10 Apr 2012 15:46:04 +0000 (+0000) Subject: Improve About dialog box's look-n-feel X-Git-Tag: V6_5_0b1~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0e7f782361a099e92e39fd98a0115d8f83ff97d7;p=tools%2Finstall.git Improve About dialog box's look-n-feel --- diff --git a/src/SALOME_InstallWizard.cxx b/src/SALOME_InstallWizard.cxx index c1de103..b3d88d2 100644 --- a/src/SALOME_InstallWizard.cxx +++ b/src/SALOME_InstallWizard.cxx @@ -439,7 +439,7 @@ public: AboutDlg( SALOME_InstallWizard* parent ) : QDialog( parent, "About dialog box", true ) { // caption - setCaption( QString( "About %1" ).arg( parent->getIWName() ) ); + setCaption( tr( "About %1" ).arg( parent->getIWName() ) ); // palette QPalette pal = palette(); QColorGroup cg = pal.active(); @@ -451,31 +451,19 @@ public: QGridLayout* main = new QGridLayout( this, 1, 1, 11, 6 ); // image QLabel* logo = new QLabel( this, "logo" ); - logo->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); - logo->setMinimumSize( 32, 32 ); logo->setMaximumSize( 32, 32 ); - logo->setPaletteBackgroundColor( QColor( 234, 250, 234 ) ); + logo->setFixedSize( 24, 24 ); logo->setFrameStyle( QLabel::NoFrame | QLabel::Plain ); logo->setPixmap( pixmap( pxAbout ) ); logo->setScaledContents( false ); logo->setAlignment( QLabel::AlignCenter ); - // decoration - QLabel* decorLeft = new QLabel( this, "decorLeft" ); - decorLeft->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Expanding ) ); - decorLeft->setMinimumWidth( 32 ); decorLeft->setMaximumWidth( 32 ); - decorLeft->setPaletteBackgroundColor( QColor( 234, 250, 234 ) ); - decorLeft->setScaledContents( false ); - QLabel* decorTop = new QLabel( this, "decorTop" ); - decorTop->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); - decorTop->setMinimumHeight( 32 ); decorTop->setMaximumHeight( 32 ); - decorTop->setPaletteBackgroundColor( QColor( 234, 250, 234 ) ); - decorTop->setScaledContents( false ); // contents QLabel* title = new QLabel( this, "title" ); QString tlt = parent->getIWName(); title->setText( makeTitle( tlt ) ); QLabel* version = new QLabel( this, "version" ); - version->setText( QString( "Version: %1.%1.%1" ).arg( __IW_VERSION_MAJOR__ ) \ - .arg( __IW_VERSION_MINOR__ ) \ + version->setText( QString( "Version: %1.%1.%1" ) + .arg( __IW_VERSION_MAJOR__ ) + .arg( __IW_VERSION_MINOR__ ) .arg( __IW_VERSION_PATCH__ ) ); QLabel* copyright = new QLabel( this, "copyright" ); copyright->setText( "Copyright © 2002-2012 CEA" ); @@ -494,18 +482,15 @@ public: url->setFont( font ); // layout main->addWidget( logo, 0, 0 ); - main->addMultiCellWidget( decorLeft, 1, 5, 0, 0 ); - main->addWidget( decorTop, 0, 1 ); - main->addWidget( title, 1, 1 ); - main->addWidget( version, 2, 1 ); - main->addWidget( copyright, 3, 1 ); - main->addWidget( line, 4, 1 ); - main->addWidget( url, 5, 1 ); + main->addWidget( title, 0, 1 ); + main->addWidget( version, 1, 1 ); + main->addWidget( copyright, 2, 1 ); + main->addWidget( line, 3, 1 ); + main->addWidget( url, 4, 1 ); // resize QFontMetrics fm( title->font() ); int width = (int)( fm.width( tlt ) * 1.5 ); title->setMinimumWidth( width ); -// setMaximumSize( minimumSize() ); } void mousePressEvent( QMouseEvent* ) {