diff --git a/plugins/autotest/autotest.pro b/plugins/autotest/autotest.pro index 4022cb43990..1a411d34908 100644 --- a/plugins/autotest/autotest.pro +++ b/plugins/autotest/autotest.pro @@ -49,7 +49,8 @@ HEADERS += \ testsettings.h \ testsettingspage.h \ testnavigationwidget.h \ - testxmloutputreader.h + testxmloutputreader.h \ + autotesticons.h RESOURCES += \ autotest.qrc diff --git a/plugins/autotest/autotest.qbs b/plugins/autotest/autotest.qbs index f746d7fae13..704394044c7 100644 --- a/plugins/autotest/autotest.qbs +++ b/plugins/autotest/autotest.qbs @@ -30,6 +30,7 @@ QtcCommercialPlugin { files: [ "autotest.qrc", + "autotesticons.h", "autotest_global.h", "autotestconstants.h", "autotestplugin.cpp", diff --git a/plugins/autotest/autotest.qrc b/plugins/autotest/autotest.qrc index 8c70e3ae3f5..698a86950e4 100644 --- a/plugins/autotest/autotest.qrc +++ b/plugins/autotest/autotest.qrc @@ -4,9 +4,13 @@ images/class.png images/func.png images/expand.png + images/expand@2x.png images/collapse.png + images/collapse@2x.png images/sort.png + images/sort@2x.png images/leafsort.png + images/leafsort@2x.png images/debug.png images/fail.png images/fatal.png @@ -18,9 +22,10 @@ images/blacklisted_fail.png images/blacklisted_pass.png images/benchmark.png - images/run.png - images/runselected.png - images/stop.png + images/runselected_boxes.png + images/runselected_boxes@2x.png + images/runselected_tickmarks.png + images/runselected_tickmarks@2x.png images/data.png diff --git a/plugins/autotest/autotesticons.h b/plugins/autotest/autotesticons.h new file mode 100644 index 00000000000..8454b95f405 --- /dev/null +++ b/plugins/autotest/autotesticons.h @@ -0,0 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd +** All rights reserved. +** For any questions to The Qt Company, please use contact form at +** http://www.qt.io/contact-us +** +** This file is part of the Qt Creator Enterprise Auto Test Add-on. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. +** +** If you have questions regarding the use of this file, please use +** contact form at http://www.qt.io/contact-us +** +****************************************************************************/ + +#ifndef AUTOTESTICONS_H +#define AUTOTESTICONS_H + +#include + +namespace Autotest { +namespace Icons { + +const Utils::Icon EXPAND({ + {QLatin1String(":/images/expand.png"), Utils::Theme::IconsBaseColor}}); +const Utils::Icon COLLAPSE({ + {QLatin1String(":/images/collapse.png"), Utils::Theme::IconsBaseColor}}); +const Utils::Icon SORT_ALPHABETICALLY({ + {QLatin1String(":/images/sort.png"), Utils::Theme::IconsBaseColor}}); +const Utils::Icon SORT_NATURALLY({ + {QLatin1String(":/images/leafsort.png"), Utils::Theme::IconsBaseColor}}); +const Utils::Icon RUN_SELECTED_OVERLAY({ + {QLatin1String(":/images/runselected_boxes.png"), Utils::Theme::BackgroundColorDark}, + {QLatin1String(":/images/runselected_tickmarks.png"), Utils::Theme::IconsBaseColor}}); + +} // namespace Icons +} // namespace Autotest + +#endif // AUTOTESTICONS_H diff --git a/plugins/autotest/images/collapse.png b/plugins/autotest/images/collapse.png index d6da22a5b86..c8dc840a61e 100644 Binary files a/plugins/autotest/images/collapse.png and b/plugins/autotest/images/collapse.png differ diff --git a/plugins/autotest/images/collapse@2x.png b/plugins/autotest/images/collapse@2x.png new file mode 100644 index 00000000000..823e6cc6496 Binary files /dev/null and b/plugins/autotest/images/collapse@2x.png differ diff --git a/plugins/autotest/images/expand.png b/plugins/autotest/images/expand.png index a859960ea8d..a8b3f4a486e 100644 Binary files a/plugins/autotest/images/expand.png and b/plugins/autotest/images/expand.png differ diff --git a/plugins/autotest/images/expand@2x.png b/plugins/autotest/images/expand@2x.png new file mode 100644 index 00000000000..c3466cd2ab6 Binary files /dev/null and b/plugins/autotest/images/expand@2x.png differ diff --git a/plugins/autotest/images/leafsort.png b/plugins/autotest/images/leafsort.png index f1a2636deb4..c9f744bde7c 100644 Binary files a/plugins/autotest/images/leafsort.png and b/plugins/autotest/images/leafsort.png differ diff --git a/plugins/autotest/images/leafsort@2x.png b/plugins/autotest/images/leafsort@2x.png new file mode 100644 index 00000000000..b74a94fc167 Binary files /dev/null and b/plugins/autotest/images/leafsort@2x.png differ diff --git a/plugins/autotest/images/run.png b/plugins/autotest/images/run.png deleted file mode 100644 index e302fe33e00..00000000000 Binary files a/plugins/autotest/images/run.png and /dev/null differ diff --git a/plugins/autotest/images/runselected.png b/plugins/autotest/images/runselected.png deleted file mode 100644 index 328974062ef..00000000000 Binary files a/plugins/autotest/images/runselected.png and /dev/null differ diff --git a/plugins/autotest/images/runselected_boxes.png b/plugins/autotest/images/runselected_boxes.png new file mode 100644 index 00000000000..6e39f2ee0b6 Binary files /dev/null and b/plugins/autotest/images/runselected_boxes.png differ diff --git a/plugins/autotest/images/runselected_boxes@2x.png b/plugins/autotest/images/runselected_boxes@2x.png new file mode 100644 index 00000000000..55e5863a52f Binary files /dev/null and b/plugins/autotest/images/runselected_boxes@2x.png differ diff --git a/plugins/autotest/images/runselected_tickmarks.png b/plugins/autotest/images/runselected_tickmarks.png new file mode 100644 index 00000000000..6296f8748da Binary files /dev/null and b/plugins/autotest/images/runselected_tickmarks.png differ diff --git a/plugins/autotest/images/runselected_tickmarks@2x.png b/plugins/autotest/images/runselected_tickmarks@2x.png new file mode 100644 index 00000000000..75252f173c2 Binary files /dev/null and b/plugins/autotest/images/runselected_tickmarks@2x.png differ diff --git a/plugins/autotest/images/sort.png b/plugins/autotest/images/sort.png index 2718b01d6e2..c15eb56d50a 100644 Binary files a/plugins/autotest/images/sort.png and b/plugins/autotest/images/sort.png differ diff --git a/plugins/autotest/images/sort@2x.png b/plugins/autotest/images/sort@2x.png new file mode 100644 index 00000000000..1a2e5d95204 Binary files /dev/null and b/plugins/autotest/images/sort@2x.png differ diff --git a/plugins/autotest/images/stop.png b/plugins/autotest/images/stop.png deleted file mode 100644 index 1063d089985..00000000000 Binary files a/plugins/autotest/images/stop.png and /dev/null differ diff --git a/plugins/autotest/testnavigationwidget.cpp b/plugins/autotest/testnavigationwidget.cpp index 354e2869a5d..33d996c892b 100644 --- a/plugins/autotest/testnavigationwidget.cpp +++ b/plugins/autotest/testnavigationwidget.cpp @@ -24,11 +24,13 @@ #include "testcodeparser.h" #include "testrunner.h" #include "autotestconstants.h" +#include "autotesticons.h" #include "testtreeitem.h" #include #include #include +#include #include #include #include @@ -149,7 +151,7 @@ QList TestNavigationWidget::createToolButtons() QList list; m_filterButton = new QToolButton(m_view); - m_filterButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_FILTER))); + m_filterButton->setIcon(Core::Icons::FILTER.icon()); m_filterButton->setToolTip(tr("Filter Test Tree")); m_filterButton->setProperty("noArrow", true); m_filterButton->setAutoRaise(true); @@ -161,15 +163,15 @@ QList TestNavigationWidget::createToolButtons() m_sortAlphabetically = true; m_sort = new QToolButton(this); - m_sort->setIcon((QIcon(QLatin1String(":/images/leafsort.png")))); + m_sort->setIcon(Icons::SORT_NATURALLY.icon()); m_sort->setToolTip(tr("Sort Naturally")); QToolButton *expand = new QToolButton(this); - expand->setIcon(QIcon(QLatin1String(":/images/expand.png"))); + expand->setIcon(Icons::EXPAND.icon()); expand->setToolTip(tr("Expand All")); QToolButton *collapse = new QToolButton(this); - collapse->setIcon(QIcon(QLatin1String(":/images/collapse.png"))); + collapse->setIcon(Icons::COLLAPSE.icon()); collapse->setToolTip(tr("Collapse All")); connect(expand, &QToolButton::clicked, m_view, &TestTreeView::expandAll); @@ -193,11 +195,11 @@ void TestNavigationWidget::onItemActivated(const QModelIndex &index) void TestNavigationWidget::onSortClicked() { if (m_sortAlphabetically) { - m_sort->setIcon((QIcon(QLatin1String(":/images/sort.png")))); + m_sort->setIcon(Icons::SORT_ALPHABETICALLY.icon()); m_sort->setToolTip(tr("Sort Alphabetically")); m_sortFilterModel->setSortMode(TestTreeSortFilterModel::Naturally); } else { - m_sort->setIcon((QIcon(QLatin1String(":/images/leafsort.png")))); + m_sort->setIcon(Icons::SORT_NATURALLY.icon()); m_sort->setToolTip(tr("Sort Naturally")); m_sortFilterModel->setSortMode(TestTreeSortFilterModel::Alphabetically); } diff --git a/plugins/autotest/testresultspane.cpp b/plugins/autotest/testresultspane.cpp index abc91dfb66e..253dc6685ec 100644 --- a/plugins/autotest/testresultspane.cpp +++ b/plugins/autotest/testresultspane.cpp @@ -18,6 +18,7 @@ ****************************************************************************/ #include "autotestplugin.h" +#include "autotesticons.h" #include "testresultspane.h" #include "testresultmodel.h" #include "testresultdelegate.h" @@ -26,10 +27,13 @@ #include "testtreemodel.h" #include +#include #include #include #include +#include + #include #include @@ -127,7 +131,7 @@ TestResultsPane::TestResultsPane(QObject *parent) : void TestResultsPane::createToolButtons() { m_expandCollapse = new QToolButton(m_treeView); - m_expandCollapse->setIcon(QIcon(QLatin1String(":/find/images/expand.png"))); + m_expandCollapse->setIcon(Core::Icons::EXPAND.icon()); m_expandCollapse->setToolTip(tr("Expand All")); m_expandCollapse->setCheckable(true); m_expandCollapse->setChecked(false); @@ -139,25 +143,27 @@ void TestResultsPane::createToolButtons() }); m_runAll = new QToolButton(m_treeView); - m_runAll->setIcon(QIcon(QLatin1String(":/images/run.png"))); + m_runAll->setIcon(ProjectExplorer::Icons::RUN_SMALL.icon()); m_runAll->setToolTip(tr("Run All Tests")); m_runAll->setEnabled(false); connect(m_runAll, &QToolButton::clicked, this, &TestResultsPane::onRunAllTriggered); m_runSelected = new QToolButton(m_treeView); - m_runSelected->setIcon(QIcon(QLatin1String(":/images/runselected.png"))); + Utils::Icon runSelectedIcon = ProjectExplorer::Icons::RUN_SMALL; + runSelectedIcon.append(Icons::RUN_SELECTED_OVERLAY); + m_runSelected->setIcon(runSelectedIcon.icon()); m_runSelected->setToolTip(tr("Run Selected Tests")); m_runSelected->setEnabled(false); connect(m_runSelected, &QToolButton::clicked, this, &TestResultsPane::onRunSelectedTriggered); m_stopTestRun = new QToolButton(m_treeView); - m_stopTestRun->setIcon(QIcon(QLatin1String(":/images/stop.png"))); + m_stopTestRun->setIcon(ProjectExplorer::Icons::STOP_SMALL.icon()); m_stopTestRun->setToolTip(tr("Stop Test Run")); m_stopTestRun->setEnabled(false); connect(m_stopTestRun, &QToolButton::clicked, TestRunner::instance(), &TestRunner::requestStopTestRun); m_filterButton = new QToolButton(m_treeView); - m_filterButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_FILTER))); + m_filterButton->setIcon(Core::Icons::FILTER.icon()); m_filterButton->setToolTip(tr("Filter Test Results")); m_filterButton->setProperty("noArrow", true); m_filterButton->setAutoRaise(true);