Commit 03c07b80 authored by Alessandro Portale's avatar Alessandro Portale

Core: Unify the close icons

Use the same image file and recolor it as needed,

Change-Id: I914819a53ca05d83ca5b88adf44706b460b48ac0
Reviewed-by: default avatarAlessandro Portale <alessandro.portale@theqtcompany.com>
parent b10b39a6
......@@ -2,9 +2,6 @@
<qresource prefix="/core">
<file>images/clean_pane_small.png</file>
<file>images/clean_pane_small@2x.png</file>
<file>images/clear.png</file>
<file>images/clear@2x.png</file>
<file>images/closebutton.png</file>
<file>images/compile_error_taskbar.png</file>
<file>images/compile_error_taskbar@2x.png</file>
<file>images/dir.png</file>
......@@ -21,6 +18,8 @@
<file>images/inputfield@2x.png</file>
<file>images/inputfield_disabled.png</file>
<file>images/inputfield_disabled@2x.png</file>
<file>images/close.png</file>
<file>images/close@2x.png</file>
<file>images/linkicon.png</file>
<file>images/linkicon@2x.png</file>
<file>images/locked.png</file>
......@@ -62,8 +61,6 @@
<file>images/unlocked@2x.png</file>
<file>images/extension.png</file>
<file>images/extension@2x.png</file>
<file>images/darkclosebutton.png</file>
<file>images/darkclosebutton@2x.png</file>
<file>images/category_core.png</file>
<file>images/category_texteditor.png</file>
<file>images/category_design.png</file>
......@@ -91,8 +88,6 @@
<file>images/category_locator.png</file>
<file>images/filtericon.png</file>
<file>images/filtericon@2x.png</file>
<file>images/button_close.png</file>
<file>images/button_close@2x.png</file>
<file>images/splitbutton_closebottom.png</file>
<file>images/splitbutton_closebottom@2x.png</file>
<file>images/splitbutton_closeleft.png</file>
......
......@@ -54,14 +54,8 @@ const Utils::Icon CUT(
QLatin1String(":/core/images/editcut.png"));
const Utils::Icon DIR(
QLatin1String(":/core/images/dir.png"));
const Utils::Icon CLEAR(
QLatin1String(":/core/images/clear.png"));
const Utils::Icon RESET(
QLatin1String(":/core/images/reset.png"));
const Utils::Icon CLOSE_BUTTON(
QLatin1String(":/core/images/closebutton.png"));
const Utils::Icon DARK_CLOSE_BUTTON(
QLatin1String(":/core/images/darkclosebutton.png"));
const Utils::Icon DARK_CLOSE(
QLatin1String(":/core/images/darkclose.png"));
const Utils::Icon LOCKED(
......@@ -99,12 +93,16 @@ const Utils::Icon MAGNIFIER({
{QLatin1String(":/core/images/magnifier.png"), Utils::Theme::BackgroundColorHover}}, Utils::Icon::Style::Tinted);
const Utils::Icon CLEAN_PANE({
{QLatin1String(":/core/images/clean_pane_small.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon RELOAD_GRAY({
const Utils::Icon RELOAD({
{QLatin1String(":/core/images/reload_gray.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon TOGGLE_SIDEBAR({
{QLatin1String(":/core/images/sidebaricon.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon BUTTON_CLOSE({
{QLatin1String(":/core/images/button_close.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon CLOSE_TOOLBAR({
{QLatin1String(":/core/images/close.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon CLOSE_FOREGROUND({
{QLatin1String(":/core/images/close.png"), Utils::Theme::PanelTextColorDark}}, Utils::Icon::Style::Tinted);
const Utils::Icon CLOSE_BACKGROUND({
{QLatin1String(":/core/images/close.png"), Utils::Theme::PanelTextColorLight}}, Utils::Icon::Style::Tinted);
const Utils::Icon SPLIT_HORIZONTAL({
{QLatin1String(":/core/images/splitbutton_horizontal.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon SPLIT_VERTICAL({
......
......@@ -152,7 +152,7 @@ EditorToolBar::EditorToolBar(QWidget *parent) :
d->m_editorList->setContextMenuPolicy(Qt::CustomContextMenu);
d->m_closeEditorButton->setAutoRaise(true);
d->m_closeEditorButton->setIcon(Icons::BUTTON_CLOSE.icon());
d->m_closeEditorButton->setIcon(Icons::CLOSE_TOOLBAR.icon());
d->m_closeEditorButton->setEnabled(false);
d->m_closeEditorButton->setProperty("showborder", true);
......
......@@ -967,13 +967,13 @@ void FindToolBar::setLightColoredIcon(bool lightColored)
m_ui.findNextButton->setArrowType(Qt::RightArrow);
m_ui.findPreviousButton->setIcon(QIcon());
m_ui.findPreviousButton->setArrowType(Qt::LeftArrow);
m_ui.close->setIcon(Icons::DARK_CLOSE.icon());
m_ui.close->setIcon(Icons::CLOSE_FOREGROUND.icon());
} else {
m_ui.findNextButton->setIcon(Icons::NEXT.icon());
m_ui.findNextButton->setArrowType(Qt::NoArrow);
m_ui.findPreviousButton->setIcon(Icons::PREV.icon());
m_ui.findPreviousButton->setArrowType(Qt::NoArrow);
m_ui.close->setIcon(Icons::BUTTON_CLOSE.icon());
m_ui.close->setIcon(Icons::CLOSE_TOOLBAR.icon());
}
}
......
......@@ -251,7 +251,7 @@ void InfoBarDisplay::update()
if (info.cancelButtonText.isEmpty()) {
infoWidgetCloseButton->setAutoRaise(true);
infoWidgetCloseButton->setIcon(Icons::CLEAR.icon());
infoWidgetCloseButton->setIcon(Icons::CLOSE_FOREGROUND.icon());
infoWidgetCloseButton->setToolTip(tr("Close"));
if (infoWidgetSuppressButton)
hbox->addWidget(infoWidgetSuppressButton);
......
......@@ -139,7 +139,7 @@ ManhattanStylePrivate::ManhattanStylePrivate() :
lineeditImage(StyleHelper::dpiSpecificImageFile(QStringLiteral(":/core/images/inputfield.png"))),
lineeditImage_disabled(StyleHelper::dpiSpecificImageFile(QStringLiteral(":/core/images/inputfield_disabled.png"))),
extButtonPixmap(Core::Icons::TOOLBAR_EXTENSION.pixmap()),
closeButtonPixmap(Core::Icons::CLOSE_BUTTON.pixmap())
closeButtonPixmap(Core::Icons::CLOSE_FOREGROUND.pixmap())
{
}
......
......@@ -88,8 +88,8 @@ void OpenDocumentsDelegate::paint(QPainter *painter, const QStyleOptionViewItem
if (closeButtonVisible && index.column() == 1 && option.state & QStyle::State_MouseOver) {
const QIcon icon = (option.state & QStyle::State_Selected) ?
Icons::CLOSE_BUTTON.icon()
: Icons::DARK_CLOSE_BUTTON.icon();
Icons::CLOSE_BACKGROUND.icon()
: Icons::CLOSE_FOREGROUND.icon();
QRect iconRect(option.rect.right() - option.rect.height(),
option.rect.top(),
......
......@@ -287,7 +287,7 @@ DiffEditor::DiffEditor()
m_toggleDescriptionAction = m_toolBar->addAction(Icons::TOP_BAR.icon(), QString());
m_toggleDescriptionAction->setCheckable(true);
m_reloadAction = m_toolBar->addAction(Core::Icons::RELOAD_GRAY.icon(), tr("Reload Diff"));
m_reloadAction = m_toolBar->addAction(Core::Icons::RELOAD.icon(), tr("Reload Diff"));
m_reloadAction->setToolTip(tr("Reload Diff"));
m_toggleSyncAction = m_toolBar->addAction(Core::Icons::LINK.icon(), QString());
......
......@@ -250,7 +250,7 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget
}
if (style != ExternalWindow) {
m_closeAction = new QAction(Core::Icons::BUTTON_CLOSE.icon(), QString(), toolBar);
m_closeAction = new QAction(Core::Icons::CLOSE_TOOLBAR.icon(), QString(), toolBar);
connect(m_closeAction, SIGNAL(triggered()), this, SIGNAL(closeButtonClicked()));
button = new QToolButton;
button->setDefaultAction(m_closeAction);
......
......@@ -313,7 +313,7 @@ SearchSideBarItem::SearchSideBarItem()
QList<QToolButton *> SearchSideBarItem::createToolBarWidgets()
{
QToolButton *reindexButton = new QToolButton;
reindexButton->setIcon(Core::Icons::RELOAD_GRAY.icon());
reindexButton->setIcon(Core::Icons::RELOAD.icon());
reindexButton->setToolTip(tr("Regenerate Index"));
connect(reindexButton, SIGNAL(clicked()),
widget(), SLOT(reindexDocumentation()));
......
......@@ -40,7 +40,7 @@ ImportLabel::ImportLabel(QWidget *parent) :
m_removeButton = new QPushButton(this);
m_removeButton->setIcon(Core::Icons::BUTTON_CLOSE.icon());
m_removeButton->setIcon(Core::Icons::CLOSE_TOOLBAR.icon());
m_removeButton->setFlat(true);
m_removeButton->setMaximumWidth(20);
m_removeButton->setMaximumHeight(20);
......@@ -72,7 +72,7 @@ void ImportLabel::setReadOnly(bool readOnly) const
{
m_removeButton->setDisabled(readOnly);
m_removeButton->setIcon(readOnly ? QIcon()
: Core::Icons::BUTTON_CLOSE.icon());
: Core::Icons::CLOSE_TOOLBAR.icon());
}
void ImportLabel::emitRemoveImport()
......
......@@ -675,7 +675,7 @@ QWidget *CallgrindToolPrivate::createWidgets()
// reset action
action = new QAction(this);
action->setDisabled(true);
action->setIcon(Core::Icons::CLEAR.icon());
action->setIcon(Core::Icons::RELOAD.icon());
//action->setText(tr("Reset"));
action->setToolTip(tr("Reset all event counters."));
connect(action, &QAction::triggered, this, &CallgrindToolPrivate::resetRequested);
......
......@@ -888,75 +888,6 @@
inkscape:groupmode="layer"
id="layer1"
style="display:inline">
<g
id="src/plugins/coreplugin/images/clear">
<rect
id="rect3855-7"
width="12"
height="12"
x="48"
y="588"
style="fill:none" />
<path
style="fill:none;stroke:#4e4e4e;stroke-width:2.82999992;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 49,589 10,10"
id="path3979"
inkscape:connector-curvature="0" />
<path
style="fill:#4e4e4e;fill-opacity:1;stroke:#4e4e4e;stroke-width:2.82999992;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="M 59,589 49,599"
id="path3981"
inkscape:connector-curvature="0" />
</g>
<rect
style="fill:#4e4e4e;fill-opacity:0.95074218;stroke:none"
id="rect3956"
width="16"
height="16"
x="60"
y="584" />
<g
id="src/plugins/coreplugin/images/closebutton"
style="opacity:0.8">
<path
inkscape:connector-curvature="0"
id="path3998"
d="m 63,588 9,9"
style="fill:none;stroke:#ffffff;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
inkscape:connector-curvature="0"
id="path4000"
d="m 63,597 9,-9"
style="fill:none;stroke:#ffffff;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<rect
y="584"
x="60"
height="16"
width="16"
id="rect4006"
style="fill:none;stroke:none" />
</g>
<g
id="src/plugins/coreplugin/images/darkclosebutton"
style="opacity:0.60100002;fill:#ffffff;fill-opacity:0">
<path
inkscape:connector-curvature="0"
id="path4171"
d="m 143,588 9,9"
style="fill:#ffffff;fill-opacity:0;stroke:#505050;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path4173"
d="m 152,588 -9,9"
style="fill:#000000;fill-opacity:0.8;stroke:#505050;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<rect
y="584"
x="140"
height="16"
width="16"
id="rect3817-2-9-1-9"
style="fill:#ffffff;fill-opacity:0" />
</g>
<g
id="src/plugins/coreplugin/images/dir">
<path
......@@ -1577,7 +1508,7 @@
style="display:inline">
<g
style="display:inline"
id="src/plugins/coreplugin/images/button_close"
id="src/plugins/coreplugin/images/close"
inkscape:export-filename="c:\Users\aportale\dev\qt-creator\src\plugins\coreplugin\images\button_close.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment