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();
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( "<b>Version</b>: %1.%1.%1" ).arg( __IW_VERSION_MAJOR__ ) \
- .arg( __IW_VERSION_MINOR__ ) \
+ version->setText( QString( "<b>Version</b>: %1.%1.%1" )
+ .arg( __IW_VERSION_MAJOR__ )
+ .arg( __IW_VERSION_MINOR__ )
.arg( __IW_VERSION_PATCH__ ) );
QLabel* copyright = new QLabel( this, "copyright" );
copyright->setText( "<b>Copyright</b> © 2002-2012 CEA" );
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* )
{