ProjectExplorer: Make the Options/Kits Category icon themable

Change-Id: I70c3fffd11b217937d6a85e88da1de688031b8e0
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Alessandro Portale
2018-02-28 18:15:57 +01:00
parent 8c2bac9359
commit 5915779e81
9 changed files with 17 additions and 7 deletions

View File

@@ -28,6 +28,7 @@
#include "cmaketoolmanager.h"
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/projectexplorericons.h>
#include <projectexplorer/project.h>
#include <coreplugin/icore.h>
#include <utils/environment.h>
@@ -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()

View File

@@ -33,6 +33,7 @@
#include <extensionsystem/pluginmanager.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/projectexplorericons.h>
#include <utils/algorithm.h>
#include <utils/asconst.h>
@@ -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()

View File

@@ -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()

View File

@@ -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";

View File

@@ -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

View File

@@ -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

View File

@@ -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()

View File

@@ -35,6 +35,7 @@
#include <projectexplorer/kit.h>
#include <projectexplorer/kitmanager.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/projectexplorericons.h>
#include <utils/algorithm.h>
#include <utils/qtcassert.h>
@@ -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()

View File

@@ -38,6 +38,7 @@
#include <projectexplorer/toolchain.h>
#include <projectexplorer/toolchainmanager.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/projectexplorericons.h>
#include <utils/buildablehelperlibrary.h>
#include <utils/hostosinfo.h>
#include <utils/pathchooser.h>
@@ -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()