diff --git a/src/libs/utils/utilsicons.cpp b/src/libs/utils/utilsicons.cpp index 94a32467b64..eef6083357b 100644 --- a/src/libs/utils/utilsicons.cpp +++ b/src/libs/utils/utilsicons.cpp @@ -84,14 +84,24 @@ const Icon SAVEFILE_TOOLBAR({ {QLatin1String(":/utils/images/filesave.png"), Theme::IconsBaseColor}}); const Icon UNDO({ {QLatin1String(":/utils/images/undo.png"), Theme::PanelTextColorMid}}, Icon::Tint); +const Icon UNDO_TOOLBAR({ + {QLatin1String(":/utils/images/undo.png"), Theme::IconsBaseColor}}); const Icon REDO({ {QLatin1String(":/utils/images/redo.png"), Theme::PanelTextColorMid}}, Icon::Tint); +const Icon REDO_TOOLBAR({ + {QLatin1String(":/utils/images/redo.png"), Theme::IconsBaseColor}}); const Icon COPY({ {QLatin1String(":/utils/images/editcopy.png"), Theme::PanelTextColorMid}}, Icon::Tint); +const Icon COPY_TOOLBAR({ + {QLatin1String(":/utils/images/editcopy.png"), Theme::IconsBaseColor}}); const Icon PASTE({ {QLatin1String(":/utils/images/editpaste.png"), Theme::PanelTextColorMid}}, Icon::Tint); +const Icon PASTE_TOOLBAR({ + {QLatin1String(":/utils/images/editpaste.png"), Theme::IconsBaseColor}}); const Icon CUT({ {QLatin1String(":/utils/images/editcut.png"), Theme::PanelTextColorMid}}, Icon::Tint); +const Icon CUT_TOOLBAR({ + {QLatin1String(":/utils/images/editcut.png"), Theme::IconsBaseColor}}); const Icon DIR( QLatin1String(":/utils/images/dir.png")); const Icon RESET({ diff --git a/src/libs/utils/utilsicons.h b/src/libs/utils/utilsicons.h index 747ebc3a36f..a1707088afd 100644 --- a/src/libs/utils/utilsicons.h +++ b/src/libs/utils/utilsicons.h @@ -58,10 +58,15 @@ QTCREATOR_UTILS_EXPORT extern const Icon OPENFILE; QTCREATOR_UTILS_EXPORT extern const Icon SAVEFILE; QTCREATOR_UTILS_EXPORT extern const Icon SAVEFILE_TOOLBAR; QTCREATOR_UTILS_EXPORT extern const Icon UNDO; +QTCREATOR_UTILS_EXPORT extern const Icon UNDO_TOOLBAR; QTCREATOR_UTILS_EXPORT extern const Icon REDO; +QTCREATOR_UTILS_EXPORT extern const Icon REDO_TOOLBAR; QTCREATOR_UTILS_EXPORT extern const Icon COPY; +QTCREATOR_UTILS_EXPORT extern const Icon COPY_TOOLBAR; QTCREATOR_UTILS_EXPORT extern const Icon PASTE; +QTCREATOR_UTILS_EXPORT extern const Icon PASTE_TOOLBAR; QTCREATOR_UTILS_EXPORT extern const Icon CUT; +QTCREATOR_UTILS_EXPORT extern const Icon CUT_TOOLBAR; QTCREATOR_UTILS_EXPORT extern const Icon DIR; QTCREATOR_UTILS_EXPORT extern const Icon RESET; QTCREATOR_UTILS_EXPORT extern const Icon RESET_TOOLBAR; diff --git a/src/plugins/scxmleditor/plugin_interface/actionhandler.cpp b/src/plugins/scxmleditor/plugin_interface/actionhandler.cpp index 85265cbabea..1b70b415223 100644 --- a/src/plugins/scxmleditor/plugin_interface/actionhandler.cpp +++ b/src/plugins/scxmleditor/plugin_interface/actionhandler.cpp @@ -50,9 +50,9 @@ ActionHandler::ActionHandler(QObject *parent) { Utils::Icons::ZOOM_TOOLBAR, tr("Magnifier"), tr("Magnifier Tool (Alt)"), "Alt", true }, { Utils::Icon(":/scxmleditor/images/navigator.png"), tr("Navigator"), tr("Navigator (Ctrl+E)"), "Ctrl+E", true }, - { Utils::Icon({{":/utils/images/editcopy.png", Utils::Theme::IconsBaseColor}}), tr("Copy"), tr("Copy (Ctrl + C)"), "Ctrl+C", false }, - { Utils::Icon({{":/utils/images/editcut.png", Utils::Theme::IconsBaseColor}}), tr("Cut"), tr("Cut (Ctrl + X)"), "Ctrl+X", false }, - { Utils::Icon({{":/utils/images/editpaste.png", Utils::Theme::IconsBaseColor}}), tr("Paste"), tr("Paste (Ctrl + V)"), "Ctrl+V", false }, + { Utils::Icons::COPY_TOOLBAR, tr("Copy"), tr("Copy (Ctrl + C)"), "Ctrl+C", false }, + { Utils::Icons::CUT_TOOLBAR, tr("Cut"), tr("Cut (Ctrl + X)"), "Ctrl+X", false }, + { Utils::Icons::PASTE_TOOLBAR, tr("Paste"), tr("Paste (Ctrl + V)"), "Ctrl+V", false }, { Utils::Icons::SNAPSHOT_TOOLBAR, tr("Screenshot"), tr("Screenshot (Ctrl + Shift + C)"), "Ctrl+Shift+C", false }, { Utils::Icon({{":/scxmleditor/images/icon-export-canvas.png", Utils::Theme::IconsBaseColor}}), tr("Export to Image"), tr("Export to Image"), "Ctrl+Shift+E", false }, { Utils::Icon({{":/utils/images/namespace.png", Utils::Theme::IconsBaseColor}}), tr("Toggle Full Namespace"), tr("Toggle Full Namespace"), "Ctrl+Shift+N", true }, diff --git a/src/plugins/scxmleditor/scxmleditordata.cpp b/src/plugins/scxmleditor/scxmleditordata.cpp index e1443856ff6..49171fe1461 100644 --- a/src/plugins/scxmleditor/scxmleditordata.cpp +++ b/src/plugins/scxmleditor/scxmleditordata.cpp @@ -46,6 +46,7 @@ #include #include +#include #include @@ -137,11 +138,11 @@ void ScxmlEditorData::fullInit() // Create undo/redo group/actions m_undoGroup = new QUndoGroup(m_widgetToolBar); m_undoAction = m_undoGroup->createUndoAction(m_widgetToolBar); - m_undoAction->setIcon(Utils::Icon({{":/utils/images/undo.png", Utils::Theme::IconsBaseColor}}).icon()); + m_undoAction->setIcon(Utils::Icons::UNDO_TOOLBAR.icon()); m_undoAction->setToolTip(tr("Undo (Ctrl + Z)")); m_redoAction = m_undoGroup->createRedoAction(m_widgetToolBar); - m_redoAction->setIcon(Utils::Icon({{":/utils/images/redo.png", Utils::Theme::IconsBaseColor}}).icon()); + m_redoAction->setIcon(Utils::Icons::REDO_TOOLBAR.icon()); m_redoAction->setToolTip(tr("Redo (Ctrl + Y)")); ActionManager::registerAction(m_undoAction, Core::Constants::UNDO, m_contexts);