ScxmlEditor: Remove duplicated icons
Some of the icons that came with the scxml editor were already present elsewhere in Qt Creator in a themable/HighDPI-able form. Remove the own .png files, use the existing icons. Change-Id: I891305faee45eeb39dac4135d2ff96fc06727731 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
@@ -9,24 +9,14 @@
|
||||
<file>images/align_right.png</file>
|
||||
<file>images/align_top.png</file>
|
||||
<file>images/align_vertical.png</file>
|
||||
<file>images/arrow_down.png</file>
|
||||
<file>images/arrow_right.png</file>
|
||||
<file>images/colorthemes.png</file>
|
||||
<file>images/final.png</file>
|
||||
<file>images/font_color.png</file>
|
||||
<file>images/fullnamespace.png</file>
|
||||
<file>images/history.png</file>
|
||||
<file>images/icon-close.png</file>
|
||||
<file>images/icon-copy.png</file>
|
||||
<file>images/icon-cut.png</file>
|
||||
<file>images/icon-export-canvas.png</file>
|
||||
<file>images/icon-filter.png</file>
|
||||
<file>images/icon-fit-screen.png</file>
|
||||
<file>images/icon-pan.png</file>
|
||||
<file>images/icon-paste.png</file>
|
||||
<file>images/icon-redo.png</file>
|
||||
<file>images/icon-search.png</file>
|
||||
<file>images/icon-undo.png</file>
|
||||
<file>images/icon-zoom-in.png</file>
|
||||
<file>images/icon-zoom-out.png</file>
|
||||
<file>images/initial.png</file>
|
||||
@@ -36,7 +26,6 @@
|
||||
<file>images/parallel_icon.png</file>
|
||||
<file>images/properties.png</file>
|
||||
<file>images/screenshot.png</file>
|
||||
<file>images/search.png</file>
|
||||
<file>images/state.png</file>
|
||||
<file>images/state_color.png</file>
|
||||
<file>images/statistics.png</file>
|
||||
|
||||
|
Before Width: | Height: | Size: 177 B |
|
Before Width: | Height: | Size: 136 B |
|
Before Width: | Height: | Size: 179 B |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 146 B |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 745 B |
|
Before Width: | Height: | Size: 997 B |
|
Before Width: | Height: | Size: 726 B |
|
Before Width: | Height: | Size: 919 B |
@@ -28,6 +28,8 @@
|
||||
#include "graphicsview.h"
|
||||
#include "sizegrip.h"
|
||||
|
||||
#include <utils/utilsicons.h>
|
||||
|
||||
#include <QResizeEvent>
|
||||
|
||||
using namespace ScxmlEditor::Common;
|
||||
@@ -36,6 +38,7 @@ Navigator::Navigator(QWidget *parent)
|
||||
: MovableFrame(parent)
|
||||
{
|
||||
m_ui.setupUi(this);
|
||||
m_ui.m_closeButton->setIcon(Utils::Icons::CLOSE_TOOLBAR.icon());
|
||||
connect(m_ui.m_closeButton, &QToolButton::clicked, this, &Navigator::hideFrame);
|
||||
m_sizeGrip = new SizeGrip(this);
|
||||
m_sizeGrip->setGeometry(0, 0, 18, 18);
|
||||
|
||||
@@ -89,13 +89,6 @@
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="common.qrc">
|
||||
<normaloff>:/scxmleditor/images/icon-close.png</normaloff>:/scxmleditor/images/icon-close.png</iconset>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -139,8 +132,6 @@
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="common.qrc"/>
|
||||
</resources>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "shapeprovider.h"
|
||||
|
||||
#include <utils/flowlayout.h>
|
||||
#include <utils/utilsicons.h>
|
||||
|
||||
using namespace ScxmlEditor::PluginInterface;
|
||||
using namespace ScxmlEditor::Common;
|
||||
@@ -36,6 +37,7 @@ ShapeGroupWidget::ShapeGroupWidget(ShapeProvider *shapeProvider, int groupIndex,
|
||||
: QWidget(parent)
|
||||
{
|
||||
m_ui.setupUi(this);
|
||||
m_ui.m_closeButton->setIcon(Utils::Icons::COLLAPSE_TOOLBAR.icon());
|
||||
auto layout = new Utils::FlowLayout;
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
@@ -52,7 +54,9 @@ ShapeGroupWidget::ShapeGroupWidget(ShapeProvider *shapeProvider, int groupIndex,
|
||||
|
||||
connect(m_ui.m_closeButton, &QToolButton::clicked, this, [this]() {
|
||||
m_ui.m_content->setVisible(!m_ui.m_content->isVisible());
|
||||
m_ui.m_closeButton->setIcon(QIcon(QLatin1String(m_ui.m_content->isVisible() ? ":/scxmleditor/images/arrow_down.png" : ":/scxmleditor/images/arrow_right.png")));
|
||||
m_ui.m_closeButton->setIcon(m_ui.m_content->isVisible()
|
||||
? Utils::Icons::COLLAPSE_TOOLBAR.icon()
|
||||
: Utils::Icons::EXPAND_TOOLBAR.icon());
|
||||
});
|
||||
|
||||
m_ui.m_content->setLayout(layout);
|
||||
|
||||
@@ -120,13 +120,6 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="m_closeButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="common.qrc">
|
||||
<normaloff>:/scxmleditor/images/arrow_down.png</normaloff>:/scxmleditor/images/arrow_down.png</iconset>
|
||||
</property>
|
||||
<property name="autoRepeat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@@ -159,8 +152,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="common.qrc"/>
|
||||
</resources>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <QRegExpValidator>
|
||||
#include <QUndoStack>
|
||||
|
||||
#include <utils/utilsicons.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
using namespace ScxmlEditor::PluginInterface;
|
||||
@@ -103,6 +104,8 @@ Structure::Structure(QWidget *parent)
|
||||
{
|
||||
m_ui.setupUi(this);
|
||||
|
||||
m_ui.m_checkboxButton->setIcon(Utils::Icons::FILTER.icon());
|
||||
|
||||
addCheckbox(tr("Common states"), State);
|
||||
addCheckbox(tr("Metadata"), Metadata);
|
||||
addCheckbox(tr("Other tags"), OnEntry);
|
||||
|
||||
@@ -153,13 +153,6 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="m_checkboxButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="common.qrc">
|
||||
<normaloff>:/scxmleditor/images/icon-filter.png</normaloff>:/scxmleditor/images/icon-filter.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
#include "actionhandler.h"
|
||||
#include "mytypes.h"
|
||||
|
||||
#include <utils/utilsicons.h>
|
||||
|
||||
#include <QAction>
|
||||
|
||||
using namespace ScxmlEditor::PluginInterface;
|
||||
@@ -36,43 +38,43 @@ ActionHandler::ActionHandler(QObject *parent)
|
||||
using AH = ActionHandler;
|
||||
|
||||
const struct {
|
||||
const char *icon;
|
||||
const Utils::Icon icon;
|
||||
QString name;
|
||||
QString tooltip;
|
||||
const char *keyseq;
|
||||
bool checkable;
|
||||
} actionInfos[] = {
|
||||
{ ":/scxmleditor/images/icon-zoom-in.png", AH::tr("Zoom In"), AH::tr("Zoom In (Ctrl + + / Ctrl + Wheel)"), "Ctrl++", false },
|
||||
{ ":/scxmleditor/images/icon-zoom-out.png", AH::tr("Zoom Out"), AH::tr("Zoom Out (Ctrl + - / Ctrl + Wheel)"), "Ctrl+-", false },
|
||||
{ ":/scxmleditor/images/icon-fit-screen.png", AH::tr("Fit to View"), AH::tr("Fit to View (F11)"), "F11", false },
|
||||
{ ":/scxmleditor/images/icon-pan.png", AH::tr("Panning"), AH::tr("Panning (Shift)"), "Shift", true },
|
||||
{ Utils::Icon(":/scxmleditor/images/icon-zoom-in.png"), AH::tr("Zoom In"), AH::tr("Zoom In (Ctrl + + / Ctrl + Wheel)"), "Ctrl++", false },
|
||||
{ Utils::Icon(":/scxmleditor/images/icon-zoom-out.png"), AH::tr("Zoom Out"), AH::tr("Zoom Out (Ctrl + - / Ctrl + Wheel)"), "Ctrl+-", false },
|
||||
{ Utils::Icon(":/scxmleditor/images/icon-fit-screen.png"), AH::tr("Fit to View"), AH::tr("Fit to View (F11)"), "F11", false },
|
||||
{ Utils::Icon(":/scxmleditor/images/icon-pan.png"), AH::tr("Panning"), AH::tr("Panning (Shift)"), "Shift", true },
|
||||
|
||||
{ ":/scxmleditor/images/icon-search.png", AH::tr("Magnifier"), AH::tr("Magnifier Tool (Alt)"), "Alt", true },
|
||||
{ ":/scxmleditor/images/navigator.png", AH::tr("Navigator"), AH::tr("Navigator (Ctrl+E)"), "Ctrl+E", true },
|
||||
{ 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 },
|
||||
|
||||
{ ":/scxmleditor/images/icon-copy.png", AH::tr("Copy"), AH::tr("Copy (Ctrl + C)"), "Ctrl+C", false },
|
||||
{ ":/scxmleditor/images/icon-cut.png", AH::tr("Cut"), AH::tr("Cut (Ctrl + X)"), "Ctrl+X", false },
|
||||
{ ":/scxmleditor/images/icon-paste.png", AH::tr("Paste"), AH::tr("Paste (Ctrl + V)"), "Ctrl+V", false },
|
||||
{ ":/scxmleditor/images/screenshot.png", AH::tr("Screenshot"), AH::tr("Screenshot (Ctrl + Shift + C)"), "Ctrl+Shift+C", false },
|
||||
{ ":/scxmleditor/images/icon-export-canvas.png", AH::tr("Export to Image"), AH::tr("Export to Image"), "Ctrl+Shift+E", false },
|
||||
{ ":/scxmleditor/images/fullnamespace.png", AH::tr("Toggle Full Namespace"), AH::tr("Toggle Full Namespace"), "Ctrl+Shift+N", 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(":/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 },
|
||||
|
||||
{ ":/scxmleditor/images/align_left.png", AH::tr("Align Left"), AH::tr("Align Left (Ctrl+L,1)"), "Ctrl+L,1", false },
|
||||
{ ":/scxmleditor/images/align_right.png", AH::tr("Align Right"), AH::tr("Align Right (Ctrl+L,2)"), "Ctrl+L,2", false },
|
||||
{ ":/scxmleditor/images/align_top.png", AH::tr("Align Top"), AH::tr("Align Top (Ctrl+L,3)"), "Ctrl+L,3", false },
|
||||
{ ":/scxmleditor/images/align_bottom.png", AH::tr("Align Bottom"), AH::tr("Align Bottom (Ctrl+L,4)"), "Ctrl+L,4", false },
|
||||
{ ":/scxmleditor/images/align_horizontal.png", AH::tr("Align Horizontal"), AH::tr("Align Horizontal (Ctrl+L,5)"), "Ctrl+L,5", false },
|
||||
{ ":/scxmleditor/images/align_vertical.png", AH::tr("Align Vertical"), AH::tr("Align Vertical (Ctrl+L,6)"), "Ctrl+L,6", false },
|
||||
{ ":/scxmleditor/images/adjust_width.png", AH::tr("Adjust Width"), AH::tr("Adjust Width (Ctrl+L,7)"), "Ctrl+L,7", false },
|
||||
{ ":/scxmleditor/images/adjust_height.png", AH::tr("Adjust Height"), AH::tr("Adjust Height (Ctrl+L,8)"), "Ctrl+L,8", false },
|
||||
{ ":/scxmleditor/images/adjust_size.png", AH::tr("Adjust Size"), AH::tr("Adjust Size (Ctrl+L,9)"), "Ctrl+L,9", false },
|
||||
{ Utils::Icon(":/scxmleditor/images/align_left.png"), AH::tr("Align Left"), AH::tr("Align Left (Ctrl+L,1)"), "Ctrl+L,1", false },
|
||||
{ Utils::Icon(":/scxmleditor/images/align_right.png"), AH::tr("Align Right"), AH::tr("Align Right (Ctrl+L,2)"), "Ctrl+L,2", false },
|
||||
{ Utils::Icon(":/scxmleditor/images/align_top.png"), AH::tr("Align Top"), AH::tr("Align Top (Ctrl+L,3)"), "Ctrl+L,3", false },
|
||||
{ Utils::Icon(":/scxmleditor/images/align_bottom.png"), AH::tr("Align Bottom"), AH::tr("Align Bottom (Ctrl+L,4)"), "Ctrl+L,4", false },
|
||||
{ Utils::Icon(":/scxmleditor/images/align_horizontal.png"), AH::tr("Align Horizontal"), AH::tr("Align Horizontal (Ctrl+L,5)"), "Ctrl+L,5", false },
|
||||
{ Utils::Icon(":/scxmleditor/images/align_vertical.png"), AH::tr("Align Vertical"), AH::tr("Align Vertical (Ctrl+L,6)"), "Ctrl+L,6", false },
|
||||
{ Utils::Icon(":/scxmleditor/images/adjust_width.png"), AH::tr("Adjust Width"), AH::tr("Adjust Width (Ctrl+L,7)"), "Ctrl+L,7", false },
|
||||
{ Utils::Icon(":/scxmleditor/images/adjust_height.png"), AH::tr("Adjust Height"), AH::tr("Adjust Height (Ctrl+L,8)"), "Ctrl+L,8", false },
|
||||
{ Utils::Icon(":/scxmleditor/images/adjust_size.png"), AH::tr("Adjust Size"), AH::tr("Adjust Size (Ctrl+L,9)"), "Ctrl+L,9", false },
|
||||
|
||||
{ ":/scxmleditor/images/statistics.png", AH::tr("Show Statistics..."), AH::tr("Show Statistics"), "", false }
|
||||
{ Utils::Icon(":/scxmleditor/images/statistics.png"), AH::tr("Show Statistics..."), AH::tr("Show Statistics"), "", false }
|
||||
};
|
||||
|
||||
// Init actions
|
||||
for (auto info: actionInfos) {
|
||||
auto action = new QAction(QIcon(QLatin1String(info.icon)), info.name, this);
|
||||
for (const auto &info: actionInfos) {
|
||||
auto action = new QAction(info.icon.icon(), info.name, this);
|
||||
action->setCheckable(info.checkable);
|
||||
action->setToolTip(info.tooltip);
|
||||
action->setShortcut(QKeySequence(QLatin1String(info.keyseq)));
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/utilsicons.h>
|
||||
|
||||
#include <QVBoxLayout>
|
||||
|
||||
@@ -136,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(QIcon(":/scxmleditor/images/icon-undo.png"));
|
||||
m_undoAction->setIcon(Utils::Icons::UNDO.icon());
|
||||
m_undoAction->setToolTip(tr("Undo (Ctrl + Z)"));
|
||||
|
||||
m_redoAction = m_undoGroup->createRedoAction(m_widgetToolBar);
|
||||
m_redoAction->setIcon(QIcon(":/scxmleditor/images/icon-redo.png"));
|
||||
m_redoAction->setIcon(Utils::Icons::REDO.icon());
|
||||
m_redoAction->setToolTip(tr("Redo (Ctrl + Y)"));
|
||||
|
||||
ActionManager::registerAction(m_undoAction, Core::Constants::UNDO, m_contexts);
|
||||
|
||||