Name print, save, zoomIn, zoomOut and zoomBase buttons for convenient CSS styling.

This commit is contained in:
Tvangeste 2012-12-26 18:16:21 +01:00
parent 26f87ddcc6
commit 35cda1c22c

View file

@ -123,17 +123,29 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
this, SLOT( pronounce() ) ); this, SLOT( pronounce() ) );
// zooming // zooming
navToolbar->addSeparator(); // named separator (to be able to hide it via CSS)
navToolbar->widgetForAction( navToolbar->addSeparator() )->setObjectName( "separatorBeforeZoom" );
zoomIn = navToolbar->addAction( QIcon( ":/icons/icon32_zoomin.png" ), tr( "Zoom In" ) ); zoomIn = navToolbar->addAction( QIcon( ":/icons/icon32_zoomin.png" ), tr( "Zoom In" ) );
zoomIn->setShortcut( QKeySequence::ZoomIn ); zoomIn->setShortcut( QKeySequence::ZoomIn );
navToolbar->widgetForAction( zoomIn )->setObjectName( "zoomInButton" );
zoomOut = navToolbar->addAction( QIcon( ":/icons/icon32_zoomout.png" ), tr( "Zoom Out" ) ); zoomOut = navToolbar->addAction( QIcon( ":/icons/icon32_zoomout.png" ), tr( "Zoom Out" ) );
zoomOut->setShortcut( QKeySequence::ZoomOut ); zoomOut->setShortcut( QKeySequence::ZoomOut );
navToolbar->widgetForAction( zoomOut )->setObjectName( "zoomOutButton" );
zoomBase = navToolbar->addAction( QIcon( ":/icons/icon32_zoombase.png" ), tr( "Normal Size" ) ); zoomBase = navToolbar->addAction( QIcon( ":/icons/icon32_zoombase.png" ), tr( "Normal Size" ) );
zoomBase->setShortcut( QKeySequence( "Ctrl+0" ) ); zoomBase->setShortcut( QKeySequence( "Ctrl+0" ) );
navToolbar->widgetForAction( zoomBase )->setObjectName( "zoomBaseButton" );
// named separator (to be able to hide it via CSS)
navToolbar->widgetForAction( navToolbar->addSeparator() )->setObjectName( "separatorBeforeSave" );
navToolbar->addSeparator();
navToolbar->addAction( ui.saveArticle ); navToolbar->addAction( ui.saveArticle );
navToolbar->widgetForAction( ui.saveArticle )->setObjectName( "saveArticleButton" );
navToolbar->addAction( ui.print ); navToolbar->addAction( ui.print );
navToolbar->widgetForAction( ui.print )->setObjectName( "printButton" );
// Make the search pane's titlebar // Make the search pane's titlebar
groupLabel.setText( tr( "Look up in:" ) ); groupLabel.setText( tr( "Look up in:" ) );