From 6c682f4570d7aa8976389b383f28239ee35a0412 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 26 Jan 2017 18:11:59 +0100 Subject: [PATCH] Utils: move pan icon from scxml to utils It will also be used in Qt Quick Designer Change-Id: Id4e16f417c5faf8baf9437c0d4845397f3ddb4fc Reviewed-by: Marco Benelli Reviewed-by: Thomas Hartmann --- .../icon-pan.png => libs/utils/images/pan.png} | Bin .../utils/images/pan@2x.png} | Bin src/libs/utils/utils.qrc | 2 ++ src/libs/utils/utilsicons.cpp | 2 ++ src/libs/utils/utilsicons.h | 1 + src/plugins/scxmleditor/common/common.qrc | 2 -- .../scxmleditor/plugin_interface/actionhandler.cpp | 2 +- src/tools/icons/qtcreatoricons.svg | 2 +- 8 files changed, 7 insertions(+), 4 deletions(-) rename src/{plugins/scxmleditor/common/images/icon-pan.png => libs/utils/images/pan.png} (100%) rename src/{plugins/scxmleditor/common/images/icon-pan@2x.png => libs/utils/images/pan@2x.png} (100%) diff --git a/src/plugins/scxmleditor/common/images/icon-pan.png b/src/libs/utils/images/pan.png similarity index 100% rename from src/plugins/scxmleditor/common/images/icon-pan.png rename to src/libs/utils/images/pan.png diff --git a/src/plugins/scxmleditor/common/images/icon-pan@2x.png b/src/libs/utils/images/pan@2x.png similarity index 100% rename from src/plugins/scxmleditor/common/images/icon-pan@2x.png rename to src/libs/utils/images/pan@2x.png diff --git a/src/libs/utils/utils.qrc b/src/libs/utils/utils.qrc index eff85a3d455..e8a034f4658 100644 --- a/src/libs/utils/utils.qrc +++ b/src/libs/utils/utils.qrc @@ -170,5 +170,7 @@ images/namespace@2x.png images/filledcircle.png images/filledcircle@2x.png + images/pan.png + images/pan@2x.png diff --git a/src/libs/utils/utilsicons.cpp b/src/libs/utils/utilsicons.cpp index 72018885fbb..12dac5d37e6 100644 --- a/src/libs/utils/utilsicons.cpp +++ b/src/libs/utils/utilsicons.cpp @@ -208,6 +208,8 @@ const Icon COLLAPSE({ {QLatin1String(":/utils/images/collapse.png"), Theme::PanelTextColorMid}}, Icon::Tint); const Icon COLLAPSE_TOOLBAR({ {QLatin1String(":/utils/images/collapse.png"), Theme::IconsBaseColor}}); +const Icon PAN_TOOLBAR({ + {QLatin1String(":/utils/images/pan.png"), Theme::IconsBaseColor}}); const Icon EMPTY14(":/utils/images/empty14.png"); const Icon OVERLAY_ADD({ {":/utils/images/iconoverlay_add_background.png", Theme::BackgroundColorNormal}, diff --git a/src/libs/utils/utilsicons.h b/src/libs/utils/utilsicons.h index b47698f3c41..b06a3747288 100644 --- a/src/libs/utils/utilsicons.h +++ b/src/libs/utils/utilsicons.h @@ -121,6 +121,7 @@ QTCREATOR_UTILS_EXPORT extern const Icon EXPAND; QTCREATOR_UTILS_EXPORT extern const Icon EXPAND_TOOLBAR; QTCREATOR_UTILS_EXPORT extern const Icon COLLAPSE; QTCREATOR_UTILS_EXPORT extern const Icon COLLAPSE_TOOLBAR; +QTCREATOR_UTILS_EXPORT extern const Icon PAN_TOOLBAR; QTCREATOR_UTILS_EXPORT extern const Icon EMPTY14; QTCREATOR_UTILS_EXPORT extern const Icon OVERLAY_ADD; QTCREATOR_UTILS_EXPORT extern const Icon OVERLAY_WARNING; diff --git a/src/plugins/scxmleditor/common/common.qrc b/src/plugins/scxmleditor/common/common.qrc index 7981a023097..d32c95ed3d3 100644 --- a/src/plugins/scxmleditor/common/common.qrc +++ b/src/plugins/scxmleditor/common/common.qrc @@ -24,8 +24,6 @@ images/history.png images/icon-export-canvas.png images/icon-export-canvas@2x.png - images/icon-pan.png - images/icon-pan@2x.png images/initial.png images/more_colors.png images/navigator.png diff --git a/src/plugins/scxmleditor/plugin_interface/actionhandler.cpp b/src/plugins/scxmleditor/plugin_interface/actionhandler.cpp index 1b70b415223..c12e238a592 100644 --- a/src/plugins/scxmleditor/plugin_interface/actionhandler.cpp +++ b/src/plugins/scxmleditor/plugin_interface/actionhandler.cpp @@ -45,7 +45,7 @@ ActionHandler::ActionHandler(QObject *parent) { Utils::Icons::ZOOMIN_TOOLBAR, tr("Zoom In"), tr("Zoom In (Ctrl + + / Ctrl + Wheel)"), "Ctrl++", false }, { Utils::Icons::ZOOMOUT_TOOLBAR, tr("Zoom Out"), tr("Zoom Out (Ctrl + - / Ctrl + Wheel)"), "Ctrl+-", false }, { Utils::Icons::FITTOVIEW_TOOLBAR, tr("Fit to View"), tr("Fit to View (F11)"), "F11", false }, - { Utils::Icon({{":/scxmleditor/images/icon-pan.png", Utils::Theme::IconsBaseColor}}), tr("Panning"), tr("Panning (Shift)"), "Shift", true }, + { Utils::Icons::PAN_TOOLBAR, tr("Panning"), tr("Panning (Shift)"), "Shift", true }, { 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 }, diff --git a/src/tools/icons/qtcreatoricons.svg b/src/tools/icons/qtcreatoricons.svg index 9ad1518a3b7..222619401a1 100644 --- a/src/tools/icons/qtcreatoricons.svg +++ b/src/tools/icons/qtcreatoricons.svg @@ -4034,7 +4034,7 @@ + id="src/libs/utils/images/pan">