summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2010-03-23 11:40:39 (GMT)
committerThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2010-03-23 12:36:09 (GMT)
commita749609f6f00978259dc7b50f020e404eff0a2b0 (patch)
treedad611dff472881a1a4f0f2b1fccd190cb872bdc
parent0b312175febbf2fff73da59736c45c2da02d275d (diff)
downloadQt-a749609f6f00978259dc7b50f020e404eff0a2b0.zip
Qt-a749609f6f00978259dc7b50f020e404eff0a2b0.tar.gz
Qt-a749609f6f00978259dc7b50f020e404eff0a2b0.tar.bz2
Use more standard icons from the theme in Assistant
Added standard theme icons for New Tab, Close, Page Setup, Print Preview, Quit, New Bookmark and About actions. Also adjusted the File menu to look a bit more standard (moved New Tab action to the top). Reviewed-by: Jens Bache-Wiig <jbache@trolltech.com>
-rw-r--r--tools/assistant/tools/assistant/bookmarkmanager.cpp5
-rw-r--r--tools/assistant/tools/assistant/mainwindow.cpp16
2 files changed, 15 insertions, 6 deletions
diff --git a/tools/assistant/tools/assistant/bookmarkmanager.cpp b/tools/assistant/tools/assistant/bookmarkmanager.cpp
index b9a1b0e..4bc7027 100644
--- a/tools/assistant/tools/assistant/bookmarkmanager.cpp
+++ b/tools/assistant/tools/assistant/bookmarkmanager.cpp
@@ -363,8 +363,9 @@ void BookmarkManager::refeshBookmarkMenu()
bookmarkMenu->addAction(tr("Manage Bookmarks..."), this,
SLOT(manageBookmarks()));
- bookmarkMenu->addAction(tr("Add Bookmark..."), this, SLOT(addBookmark()),
- QKeySequence(tr("Ctrl+D")));
+ bookmarkMenu->addAction(QIcon::fromTheme("bookmark-new"),
+ tr("Add Bookmark..."), this, SLOT(addBookmark()),
+ QKeySequence(tr("Ctrl+D")));
bookmarkMenu->addSeparator();
const QModelIndex &root = bookmarkModel->index(0, 0, QModelIndex());
diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp
index c403aa7..913e342 100644
--- a/tools/assistant/tools/assistant/mainwindow.cpp
+++ b/tools/assistant/tools/assistant/mainwindow.cpp
@@ -409,6 +409,11 @@ void MainWindow::setupActions()
QMenu *menu = menuBar()->addMenu(tr("&File"));
+ m_newTabAction = menu->addAction(tr("New &Tab"), m_centralWidget, SLOT(newTab()));
+ m_newTabAction->setShortcut(QKeySequence::AddTab);
+
+ menu->addSeparator();
+
m_pageSetupAction = menu->addAction(tr("Page Set&up..."), m_centralWidget,
SLOT(pageSetup()));
m_printPreviewAction = menu->addAction(tr("Print Preview..."), m_centralWidget,
@@ -421,14 +426,12 @@ void MainWindow::setupActions()
menu->addSeparator();
- m_newTabAction = menu->addAction(tr("New &Tab"), m_centralWidget, SLOT(newTab()));
- m_newTabAction->setShortcut(QKeySequence::AddTab);
-
m_closeTabAction = menu->addAction(tr("&Close Tab"), m_centralWidget,
SLOT(closeTab()));
m_closeTabAction->setShortcuts(QKeySequence::Close);
- QAction *tmp = menu->addAction(tr("&Quit"), this, SLOT(close()));
+ QAction *tmp = menu->addAction(QIcon::fromTheme("application-exit"),
+ tr("&Quit"), this, SLOT(close()));
tmp->setMenuRole(QAction::QuitRole);
#ifdef Q_OS_WIN
tmp->setShortcut(QKeySequence(tr("CTRL+Q")));
@@ -532,6 +535,8 @@ void MainWindow::setupActions()
m_aboutAction->setMenuRole(QAction::AboutRole);
#ifdef Q_WS_X11
+ m_newTabAction->setIcon(QIcon::fromTheme("tab-new", m_newTabAction->icon()));
+ m_closeTabAction->setIcon(QIcon::fromTheme("window-close", m_closeTabAction->icon()));
m_backAction->setIcon(QIcon::fromTheme("go-previous" , m_backAction->icon()));
m_nextAction->setIcon(QIcon::fromTheme("go-next" , m_nextAction->icon()));
m_zoomInAction->setIcon(QIcon::fromTheme("zoom-in" , m_zoomInAction->icon()));
@@ -541,7 +546,10 @@ void MainWindow::setupActions()
m_copyAction->setIcon(QIcon::fromTheme("edit-copy" , m_copyAction->icon()));
m_findAction->setIcon(QIcon::fromTheme("edit-find" , m_findAction->icon()));
m_homeAction->setIcon(QIcon::fromTheme("go-home" , m_homeAction->icon()));
+ m_pageSetupAction->setIcon(QIcon::fromTheme("document-page-setup", m_pageSetupAction->icon()));
+ m_printPreviewAction->setIcon(QIcon::fromTheme("document-print-preview", m_printPreviewAction->icon()));
m_printAction->setIcon(QIcon::fromTheme("document-print" , m_printAction->icon()));
+ m_aboutAction->setIcon(QIcon::fromTheme("help-about", m_aboutAction->icon()));
#endif
QToolBar *navigationBar = addToolBar(tr("Navigation Toolbar"));