From 5915779e816a45f404a57bb39bfff05f7568e747 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 28 Feb 2018 18:15:57 +0100 Subject: [PATCH] ProjectExplorer: Make the Options/Kits Category icon themable Change-Id: I70c3fffd11b217937d6a85e88da1de688031b8e0 Reviewed-by: hjk --- src/plugins/cmakeprojectmanager/cmakesettingspage.cpp | 3 ++- src/plugins/debugger/debuggeritemmanager.cpp | 3 ++- src/plugins/projectexplorer/kitoptionspage.cpp | 3 ++- src/plugins/projectexplorer/projectexplorerconstants.h | 1 - src/plugins/projectexplorer/projectexplorericons.cpp | 3 +++ src/plugins/projectexplorer/projectexplorericons.h | 2 ++ src/plugins/projectexplorer/toolchainoptionspage.cpp | 3 ++- src/plugins/qbsprojectmanager/qbsprofilessettingspage.cpp | 3 ++- src/plugins/qtsupport/qtoptionspage.cpp | 3 ++- 9 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmakesettingspage.cpp b/src/plugins/cmakeprojectmanager/cmakesettingspage.cpp index 641132cb3f5..4355d196a3c 100644 --- a/src/plugins/cmakeprojectmanager/cmakesettingspage.cpp +++ b/src/plugins/cmakeprojectmanager/cmakesettingspage.cpp @@ -28,6 +28,7 @@ #include "cmaketoolmanager.h" #include +#include #include #include #include @@ -575,7 +576,7 @@ CMakeSettingsPage::CMakeSettingsPage() setCategory(ProjectExplorer::Constants::KITS_SETTINGS_CATEGORY); setDisplayCategory(QCoreApplication::translate("ProjectExplorer", ProjectExplorer::Constants::KITS_SETTINGS_TR_CATEGORY)); - setCategoryIcon(Utils::Icon(ProjectExplorer::Constants::KITS_SETTINGS_CATEGORY_ICON)); + setCategoryIcon(ProjectExplorer::Icons::OPTIONS_CATEGORY_KITS); } QWidget *CMakeSettingsPage::widget() diff --git a/src/plugins/debugger/debuggeritemmanager.cpp b/src/plugins/debugger/debuggeritemmanager.cpp index 6893aa307ae..732c0e82712 100644 --- a/src/plugins/debugger/debuggeritemmanager.cpp +++ b/src/plugins/debugger/debuggeritemmanager.cpp @@ -33,6 +33,7 @@ #include #include +#include #include #include @@ -603,7 +604,7 @@ DebuggerOptionsPage::DebuggerOptionsPage() setCategory(ProjectExplorer::Constants::KITS_SETTINGS_CATEGORY); setDisplayCategory(QCoreApplication::translate("ProjectExplorer", ProjectExplorer::Constants::KITS_SETTINGS_TR_CATEGORY)); - setCategoryIcon(Utils::Icon(ProjectExplorer::Constants::KITS_SETTINGS_CATEGORY_ICON)); + setCategoryIcon(ProjectExplorer::Icons::OPTIONS_CATEGORY_KITS); } QWidget *DebuggerOptionsPage::widget() diff --git a/src/plugins/projectexplorer/kitoptionspage.cpp b/src/plugins/projectexplorer/kitoptionspage.cpp index 828f4689cf7..17b3484f914 100644 --- a/src/plugins/projectexplorer/kitoptionspage.cpp +++ b/src/plugins/projectexplorer/kitoptionspage.cpp @@ -28,6 +28,7 @@ #include "kitmodel.h" #include "kit.h" #include "projectexplorerconstants.h" +#include "projectexplorericons.h" #include "kitmanagerconfigwidget.h" #include "kitmanager.h" @@ -241,7 +242,7 @@ KitOptionsPage::KitOptionsPage() setCategory(Constants::KITS_SETTINGS_CATEGORY); setDisplayCategory(QCoreApplication::translate("ProjectExplorer", Constants::KITS_SETTINGS_TR_CATEGORY)); - setCategoryIcon(Utils::Icon(Constants::KITS_SETTINGS_CATEGORY_ICON)); + setCategoryIcon(ProjectExplorer::Icons::OPTIONS_CATEGORY_KITS); } QWidget *KitOptionsPage::widget() diff --git a/src/plugins/projectexplorer/projectexplorerconstants.h b/src/plugins/projectexplorer/projectexplorerconstants.h index 6e557739c1f..9750fe5a08b 100644 --- a/src/plugins/projectexplorer/projectexplorerconstants.h +++ b/src/plugins/projectexplorer/projectexplorerconstants.h @@ -103,7 +103,6 @@ const char SCXML_MIMETYPE[] = "application/scxml+xml"; // Kits settings category const char KITS_SETTINGS_CATEGORY[] = "A.Kits"; const char KITS_SETTINGS_TR_CATEGORY[] = QT_TRANSLATE_NOOP("ProjectExplorer", "Kits"); -const char KITS_SETTINGS_CATEGORY_ICON[] = ":/projectexplorer/images/mode_project_mask@2x.png"; // Kits pages const char KITS_SETTINGS_PAGE_ID[] = "D.ProjectExplorer.KitsOptions"; diff --git a/src/plugins/projectexplorer/projectexplorericons.cpp b/src/plugins/projectexplorer/projectexplorericons.cpp index cd1913838da..2a2cd8cb807 100644 --- a/src/plugins/projectexplorer/projectexplorericons.cpp +++ b/src/plugins/projectexplorer/projectexplorericons.cpp @@ -96,5 +96,8 @@ const Icon MODE_PROJECT_FLAT({ const Icon MODE_PROJECT_FLAT_ACTIVE({ {":/projectexplorer/images/mode_project_mask.png", Theme::IconsModeProjectActiveColor}}); +const Icon OPTIONS_CATEGORY_KITS({ + {":/projectexplorer/images/mode_project_mask.png", Theme::PanelTextColorDark}}, Icon::Tint); + } // namespace Icons } // namespace ProjectExplorer diff --git a/src/plugins/projectexplorer/projectexplorericons.h b/src/plugins/projectexplorer/projectexplorericons.h index fbef1896633..72bf6747bf2 100644 --- a/src/plugins/projectexplorer/projectexplorericons.h +++ b/src/plugins/projectexplorer/projectexplorericons.h @@ -65,5 +65,7 @@ PROJECTEXPLORER_EXPORT extern const Utils::Icon MODE_PROJECT_CLASSIC; PROJECTEXPLORER_EXPORT extern const Utils::Icon MODE_PROJECT_FLAT; PROJECTEXPLORER_EXPORT extern const Utils::Icon MODE_PROJECT_FLAT_ACTIVE; +PROJECTEXPLORER_EXPORT extern const Utils::Icon OPTIONS_CATEGORY_KITS; + } // namespace Icons } // namespace ProjectExplorer diff --git a/src/plugins/projectexplorer/toolchainoptionspage.cpp b/src/plugins/projectexplorer/toolchainoptionspage.cpp index b3ca52bdd60..430b1ebad11 100644 --- a/src/plugins/projectexplorer/toolchainoptionspage.cpp +++ b/src/plugins/projectexplorer/toolchainoptionspage.cpp @@ -27,6 +27,7 @@ #include "toolchain.h" #include "abi.h" #include "projectexplorerconstants.h" +#include "projectexplorericons.h" #include "toolchainconfigwidget.h" #include "toolchainmanager.h" @@ -435,7 +436,7 @@ ToolChainOptionsPage::ToolChainOptionsPage() setCategory(Constants::KITS_SETTINGS_CATEGORY); setDisplayCategory(QCoreApplication::translate("ProjectExplorer", Constants::KITS_SETTINGS_TR_CATEGORY)); - setCategoryIcon(Utils::Icon(Constants::KITS_SETTINGS_CATEGORY_ICON)); + setCategoryIcon(ProjectExplorer::Icons::OPTIONS_CATEGORY_KITS); } QWidget *ToolChainOptionsPage::widget() diff --git a/src/plugins/qbsprojectmanager/qbsprofilessettingspage.cpp b/src/plugins/qbsprojectmanager/qbsprofilessettingspage.cpp index cce3108d91d..7bdc2b675bd 100644 --- a/src/plugins/qbsprojectmanager/qbsprofilessettingspage.cpp +++ b/src/plugins/qbsprojectmanager/qbsprofilessettingspage.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -74,7 +75,7 @@ QbsProfilesSettingsPage::QbsProfilesSettingsPage(QObject *parent) setCategory(ProjectExplorer::Constants::KITS_SETTINGS_CATEGORY); setDisplayCategory(QCoreApplication::translate("ProjectExplorer", ProjectExplorer::Constants::KITS_SETTINGS_TR_CATEGORY)); - setCategoryIcon(Utils::Icon(ProjectExplorer::Constants::KITS_SETTINGS_CATEGORY_ICON)); + setCategoryIcon(ProjectExplorer::Icons::OPTIONS_CATEGORY_KITS); } QWidget *QbsProfilesSettingsPage::widget() diff --git a/src/plugins/qtsupport/qtoptionspage.cpp b/src/plugins/qtsupport/qtoptionspage.cpp index 0af421831f3..74686403682 100644 --- a/src/plugins/qtsupport/qtoptionspage.cpp +++ b/src/plugins/qtsupport/qtoptionspage.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -159,7 +160,7 @@ QtOptionsPage::QtOptionsPage() setCategory(ProjectExplorer::Constants::KITS_SETTINGS_CATEGORY); setDisplayCategory(QCoreApplication::translate("ProjectExplorer", ProjectExplorer::Constants::KITS_SETTINGS_TR_CATEGORY)); - setCategoryIcon(Utils::Icon(ProjectExplorer::Constants::KITS_SETTINGS_CATEGORY_ICON)); + setCategoryIcon(ProjectExplorer::Icons::OPTIONS_CATEGORY_KITS); } QWidget *QtOptionsPage::widget()