forked from qt-creator/qt-creator
ScxmlEditor: toolbar variants of undo/redo/cut/copy/paste icons
In fact these icons should not be in the toolbar at all. But integrating Cut/Copy/Paste into Qt Creator's ActionManager is too much for 4.2. Change-Id: If9ec2f946dd1c500bb7d537d412a342aec929200 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -52,9 +52,9 @@ ActionHandler::ActionHandler(QObject *parent)
|
||||
{ Utils::Icons::ZOOM_TOOLBAR, AH::tr("Magnifier"), AH::tr("Magnifier Tool (Alt)"), "Alt", true },
|
||||
{ Utils::Icon(":/scxmleditor/images/navigator.png"), AH::tr("Navigator"), AH::tr("Navigator (Ctrl+E)"), "Ctrl+E", true },
|
||||
|
||||
{ Utils::Icons::COPY, AH::tr("Copy"), AH::tr("Copy (Ctrl + C)"), "Ctrl+C", false },
|
||||
{ Utils::Icons::CUT, AH::tr("Cut"), AH::tr("Cut (Ctrl + X)"), "Ctrl+X", false },
|
||||
{ Utils::Icons::PASTE, AH::tr("Paste"), AH::tr("Paste (Ctrl + V)"), "Ctrl+V", false },
|
||||
{ Utils::Icon({{":/utils/images/editcopy.png", Utils::Theme::IconsBaseColor}}), AH::tr("Copy"), AH::tr("Copy (Ctrl + C)"), "Ctrl+C", false },
|
||||
{ Utils::Icon({{":/utils/images/editcut.png", Utils::Theme::IconsBaseColor}}), AH::tr("Cut"), AH::tr("Cut (Ctrl + X)"), "Ctrl+X", false },
|
||||
{ Utils::Icon({{":/utils/images/editpaste.png", Utils::Theme::IconsBaseColor}}), AH::tr("Paste"), AH::tr("Paste (Ctrl + V)"), "Ctrl+V", false },
|
||||
{ Utils::Icon(":/scxmleditor/images/screenshot.png"), AH::tr("Screenshot"), AH::tr("Screenshot (Ctrl + Shift + C)"), "Ctrl+Shift+C", false },
|
||||
{ Utils::Icon(":/scxmleditor/images/icon-export-canvas.png"), AH::tr("Export to Image"), AH::tr("Export to Image"), "Ctrl+Shift+E", false },
|
||||
{ Utils::Icon(":/scxmleditor/images/fullnamespace.png"), AH::tr("Toggle Full Namespace"), AH::tr("Toggle Full Namespace"), "Ctrl+Shift+N", true },
|
||||
|
@@ -45,7 +45,7 @@
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/utilsicons.h>
|
||||
#include <utils/icon.h>
|
||||
|
||||
#include <QVBoxLayout>
|
||||
|
||||
@@ -137,11 +137,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::Icons::UNDO.icon());
|
||||
m_undoAction->setIcon(Utils::Icon({{":/utils/images/undo.png", Utils::Theme::IconsBaseColor}}).icon());
|
||||
m_undoAction->setToolTip(tr("Undo (Ctrl + Z)"));
|
||||
|
||||
m_redoAction = m_undoGroup->createRedoAction(m_widgetToolBar);
|
||||
m_redoAction->setIcon(Utils::Icons::REDO.icon());
|
||||
m_redoAction->setIcon(Utils::Icon({{":/utils/images/redo.png", Utils::Theme::IconsBaseColor}}).icon());
|
||||
m_redoAction->setToolTip(tr("Redo (Ctrl + Y)"));
|
||||
|
||||
ActionManager::registerAction(m_undoAction, Core::Constants::UNDO, m_contexts);
|
||||
|
Reference in New Issue
Block a user