aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/welcome/welcomeplugin.cpp
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@theqtcompany.com>2015-11-11 19:26:58 +0100
committerAlessandro Portale <alessandro.portale@theqtcompany.com>2015-12-03 11:30:50 +0000
commit37c1823974bb11e59c820804df886c67e18deed0 (patch)
treed39f175c06868cef2251538cf6822df65fcc304d /src/plugins/welcome/welcomeplugin.cpp
parent0f50c41d059b5bffb455b76b096de92c6a79dbff (diff)
Flat and themeable side bar icons
This patch adds flat side bar icons according to http://blog.qt.io/blog/author/didesous/ The flat icons are supposed to be opt-in, via the theme flag "FlatSideBarIcons=true". It is false by default for the default theme for now. Change-Id: I1cbe69d4e138d5d23c0172a374933ac7a4ce8a5b Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Diffstat (limited to 'src/plugins/welcome/welcomeplugin.cpp')
-rw-r--r--src/plugins/welcome/welcomeplugin.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp
index 7a64fde5be..26b0aed55d 100644
--- a/src/plugins/welcome/welcomeplugin.cpp
+++ b/src/plugins/welcome/welcomeplugin.cpp
@@ -40,6 +40,7 @@
#include <coreplugin/modemanager.h>
#include <utils/algorithm.h>
+#include <utils/icon.h>
#include <utils/fileutils.h>
#include <utils/hostosinfo.h>
#include <utils/qtcassert.h>
@@ -130,7 +131,16 @@ WelcomeMode::WelcomeMode()
: m_activePlugin(0)
{
setDisplayName(tr("Welcome"));
- setIcon(QIcon(QLatin1String(":/welcome/images/mode_welcome.png")));
+
+ const Utils::Icon MODE_WELCOME_CLASSIC(
+ QLatin1String(":/welcome/images/mode_welcome.png"));
+ const Utils::Icon MODE_WELCOME_FLAT({
+ {QLatin1String(":/welcome/images/mode_welcome_mask.png"), Utils::Theme::IconsBaseColor}});
+ const Utils::Icon MODE_WELCOME_FLAT_ACTIVE({
+ {QLatin1String(":/welcome/images/mode_welcome_mask.png"), Utils::Theme::IconsModeWelcomeActiveColor}});
+
+ setIcon(Utils::Icon::modeIcon(MODE_WELCOME_CLASSIC,
+ MODE_WELCOME_FLAT, MODE_WELCOME_FLAT_ACTIVE));
setPriority(Constants::P_MODE_WELCOME);
setId(Constants::MODE_WELCOME);
setContextHelpId(QLatin1String("Qt Creator Manual"));