From 26f87ddcc652f8a4abb7a8e229700ef4bec12bcc Mon Sep 17 00:00:00 2001 From: Tvangeste Date: Wed, 26 Dec 2012 14:46:04 +0100 Subject: [PATCH] Move Print and Save buttons further down. The buttons are rarerly used and there is no point in keeping them close to the beginning of the toolbar. --- mainwindow.cc | 21 +++++++++++---------- mainwindow.hh | 3 ++- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/mainwindow.cc b/mainwindow.cc index 4512a121..ecb5dfbb 100644 --- a/mainwindow.cc +++ b/mainwindow.cc @@ -91,12 +91,8 @@ MainWindow::MainWindow( Config::Class & cfg_ ): navBack = navToolbar->addAction( QIcon( ":/icons/previous.png" ), tr( "Back" ) ); navForward = navToolbar->addAction( QIcon( ":/icons/next.png" ), tr( "Forward" ) ); - navToolbar->addSeparator(); - navToolbar->addAction( ui.print ); - navToolbar->addAction( ui.saveArticle ); - - scanPopupSeparator = navToolbar->addSeparator(); - scanPopupSeparator->setVisible( cfg.preferences.enableScanPopup ); + beforeScanPopupSeparator = navToolbar->addSeparator(); + beforeScanPopupSeparator->setVisible( cfg.preferences.enableScanPopup ); enableScanPopup = navToolbar->addAction( QIcon( ":/icons/wizard.png" ), tr( "Scan Popup" ) ); enableScanPopup->setCheckable( true ); @@ -107,6 +103,9 @@ MainWindow::MainWindow( Config::Class & cfg_ ): connect( enableScanPopup, SIGNAL( toggled( bool ) ), this, SLOT( scanEnableToggled( bool ) ) ); + afterScanPopupSeparator = navToolbar->addSeparator(); + afterScanPopupSeparator->setVisible( cfg.preferences.enableScanPopup ); + groupListInToolbar = new GroupComboBox( navToolbar ); groupListInToolbar->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); @@ -116,7 +115,6 @@ MainWindow::MainWindow( Config::Class & cfg_ ): translateBox->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed ); navToolbar->addWidget( translateBox ); - navToolbar->addSeparator(); navPronounce = navToolbar->addAction( QIcon( ":/icons/playsound.png" ), tr( "Pronounce Word (Alt+S)" ) ); navPronounce->setShortcut( QKeySequence( "Alt+S" ) ); navPronounce->setEnabled( false ); @@ -133,6 +131,10 @@ MainWindow::MainWindow( Config::Class & cfg_ ): zoomBase = navToolbar->addAction( QIcon( ":/icons/icon32_zoombase.png" ), tr( "Normal Size" ) ); zoomBase->setShortcut( QKeySequence( "Ctrl+0" ) ); + navToolbar->addSeparator(); + navToolbar->addAction( ui.saveArticle ); + navToolbar->addAction( ui.print ); + // Make the search pane's titlebar groupLabel.setText( tr( "Look up in:" ) ); groupListInDock = new GroupComboBox( &searchPaneTitleBar ); @@ -1558,10 +1560,9 @@ void MainWindow::editPreferences() cfg.preferences = p; - if ( searchInDock ) - scanPopupSeparator->setVisible( cfg.preferences.enableScanPopup ); - + beforeScanPopupSeparator->setVisible( cfg.preferences.enableScanPopup ); enableScanPopup->setVisible( cfg.preferences.enableScanPopup ); + afterScanPopupSeparator->setVisible( cfg.preferences.enableScanPopup ); if ( !cfg.preferences.enableScanPopup ) enableScanPopup->setChecked( false ); diff --git a/mainwindow.hh b/mainwindow.hh index 98e79149..f17859c8 100644 --- a/mainwindow.hh +++ b/mainwindow.hh @@ -108,7 +108,8 @@ private: showDictBarNamesAction, useSmallIconsInToolbarsAction, toggleMenuBarAction, switchExpandModeAction; QToolBar * navToolbar; MainStatusBar * mainStatusBar; - QAction * navBack, * navForward, * navPronounce, * enableScanPopup, * scanPopupSeparator; + QAction * navBack, * navForward, * navPronounce, * enableScanPopup; + QAction * beforeScanPopupSeparator, * afterScanPopupSeparator; QAction * zoomIn, * zoomOut, * zoomBase; QAction * wordsZoomIn, * wordsZoomOut, * wordsZoomBase; QMenu trayIconMenu;