summaryrefslogtreecommitdiffstats
path: root/tools/designer
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2010-03-23 11:12:26 (GMT)
committerThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2010-03-23 12:36:08 (GMT)
commit0b312175febbf2fff73da59736c45c2da02d275d (patch)
tree9c200620e3c4f0f3c2779a37fda2d34c0010a784 /tools/designer
parent35c3fa47082d6d580a9f1cfe0543e2d443f00d95 (diff)
downloadQt-0b312175febbf2fff73da59736c45c2da02d275d.zip
Qt-0b312175febbf2fff73da59736c45c2da02d275d.tar.gz
Qt-0b312175febbf2fff73da59736c45c2da02d275d.tar.bz2
Use more standard icons for standard actions in Designer
Added standard theme icons for Save As, Print, Close, Quit, Recent Files and Clear Recent Files. Also slighly optimize non-X11 platforms by not calling QIcon::fromTheme at all. Reviewed-by: Jens Bache-Wiig <jbache@trolltech.com>
Diffstat (limited to 'tools/designer')
-rw-r--r--tools/designer/src/components/formeditor/formwindowmanager.cpp4
-rw-r--r--tools/designer/src/designer/qdesigner_actions.cpp10
2 files changed, 11 insertions, 3 deletions
diff --git a/tools/designer/src/components/formeditor/formwindowmanager.cpp b/tools/designer/src/components/formeditor/formwindowmanager.cpp
index 88b4ac5..ce809ff 100644
--- a/tools/designer/src/components/formeditor/formwindowmanager.cpp
+++ b/tools/designer/src/components/formeditor/formwindowmanager.cpp
@@ -523,10 +523,11 @@ void FormWindowManager::setupActions()
connect(m_actionShowFormWindowSettingsDialog, SIGNAL(triggered()), this, SLOT(slotActionShowFormWindowSettingsDialog()));
m_actionShowFormWindowSettingsDialog->setEnabled(false);
-
+#ifdef Q_WS_X11
m_actionCopy->setIcon(QIcon::fromTheme("edit-copy", m_actionCopy->icon()));
m_actionCut->setIcon(QIcon::fromTheme("edit-cut", m_actionCut->icon()));
m_actionPaste->setIcon(QIcon::fromTheme("edit-paste", m_actionPaste->icon()));
+ m_actionDelete->setIcon(QIcon::fromTheme("edit-delete", m_actionDelete->icon()));
// These do not currently exist, but will allow theme authors to fill in the gaps
m_actionBreakLayout->setIcon(QIcon::fromTheme("designer-break-layout", m_actionBreakLayout->icon()));
@@ -536,6 +537,7 @@ void FormWindowManager::setupActions()
m_actionSplitHorizontal->setIcon(QIcon::fromTheme("designer-split-horizontal", m_actionSplitHorizontal->icon()));
m_actionSplitVertical->setIcon(QIcon::fromTheme("designer-split-vertical", m_actionSplitVertical->icon()));
m_actionAdjustSize->setIcon(QIcon::fromTheme("designer-adjust-size", m_actionAdjustSize->icon()));
+#endif
}
void FormWindowManager::slotActionCutActivated()
diff --git a/tools/designer/src/designer/qdesigner_actions.cpp b/tools/designer/src/designer/qdesigner_actions.cpp
index 887ba98..6776351 100644
--- a/tools/designer/src/designer/qdesigner_actions.cpp
+++ b/tools/designer/src/designer/qdesigner_actions.cpp
@@ -200,9 +200,15 @@ QDesignerActions::QDesignerActions(QDesignerWorkbench *workbench)
#endif
m_previewManager(0)
{
+#ifdef Q_WS_X11
m_newFormAction->setIcon(QIcon::fromTheme("document-new", m_newFormAction->icon()));
m_openFormAction->setIcon(QIcon::fromTheme("document-open", m_openFormAction->icon()));
m_saveFormAction->setIcon(QIcon::fromTheme("document-save", m_saveFormAction->icon()));
+ m_saveFormAsAction->setIcon(QIcon::fromTheme("document-save-as", m_saveFormAsAction->icon()));
+ m_printPreviewAction->setIcon(QIcon::fromTheme("document-print", m_printPreviewAction->icon()));
+ m_closeFormAction->setIcon(QIcon::fromTheme("window-close", m_closeFormAction->icon()));
+ m_quitAction->setIcon(QIcon::fromTheme("application-exit", m_quitAction->icon()));
+#endif
Q_ASSERT(m_core != 0);
qdesigner_internal::QDesignerFormWindowManager *ifwm = qobject_cast<qdesigner_internal::QDesignerFormWindowManager *>(m_core->formWindowManager());
@@ -490,13 +496,13 @@ QAction *QDesignerActions::createRecentFilesMenu()
}
updateRecentFileActions();
menu->addSeparator();
- act = new QAction(tr("Clear &Menu"), this);
+ act = new QAction(QIcon::fromTheme("edit-clear"), tr("Clear &Menu"), this);
act->setObjectName(QLatin1String("__qt_action_clear_menu_"));
connect(act, SIGNAL(triggered()), this, SLOT(clearRecentFiles()));
m_recentFilesActions->addAction(act);
menu->addAction(act);
- act = new QAction(tr("&Recent Forms"), this);
+ act = new QAction(QIcon::fromTheme("document-open-recent"), tr("&Recent Forms"), this);
act->setMenu(menu);
return act;
}