From 37c1823974bb11e59c820804df886c67e18deed0 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 11 Nov 2015 19:26:58 +0100 Subject: [PATCH] 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 --- share/qtcreator/themes/dark.creatortheme | 11 + share/qtcreator/themes/default.creatortheme | 20 +- src/libs/utils/icon.cpp | 38 +- src/libs/utils/icon.h | 10 +- src/libs/utils/stylehelper.cpp | 96 +++-- src/libs/utils/stylehelper.h | 1 + src/libs/utils/theme/theme.h | 13 +- src/plugins/analyzerbase/analyzerbase.qrc | 2 + src/plugins/analyzerbase/analyzericons.h | 6 + src/plugins/analyzerbase/analyzermanager.cpp | 5 +- .../analyzerbase/images/mode_analyze_mask.png | Bin 0 -> 113 bytes .../images/mode_analyze_mask@2x.png | Bin 0 -> 123 bytes src/plugins/coreplugin/coreicons.h | 13 + src/plugins/coreplugin/designmode.cpp | 5 +- src/plugins/coreplugin/editmode.cpp | 4 +- src/plugins/coreplugin/fancyactionbar.cpp | 6 +- src/plugins/coreplugin/fancyactionbar.qrc | 4 + src/plugins/coreplugin/fancytabwidget.cpp | 4 +- .../coreplugin/images/mode_design_mask.png | Bin 0 -> 196 bytes .../coreplugin/images/mode_design_mask@2x.png | Bin 0 -> 323 bytes .../coreplugin/images/mode_edit_mask.png | Bin 0 -> 105 bytes .../coreplugin/images/mode_edit_mask@2x.png | Bin 0 -> 115 bytes src/plugins/debugger/debugger.qrc | 8 + src/plugins/debugger/debuggericons.h | 13 + src/plugins/debugger/debuggerplugin.cpp | 18 +- .../debugger/images/debugger_continue@2x.png | Bin 0 -> 2271 bytes .../debugger/images/debugger_continue_32.png | Bin 2310 -> 0 bytes .../images/debugger_continue_mask.png | Bin 0 -> 190 bytes .../images/debugger_continue_mask@2x.png | Bin 0 -> 339 bytes .../debugger/images/debugger_interrupt@2x.png | Bin 0 -> 1442 bytes .../debugger/images/debugger_interrupt_32.png | Bin 1428 -> 0 bytes .../images/debugger_interrupt_mask.png | Bin 0 -> 96 bytes .../images/debugger_interrupt_mask@2x.png | Bin 0 -> 97 bytes .../debugger/images/mode_debug_mask.png | Bin 0 -> 229 bytes .../debugger/images/mode_debug_mask@2x.png | Bin 0 -> 456 bytes src/plugins/help/help.qrc | 2 + src/plugins/help/helpmode.cpp | 4 +- src/plugins/help/images/mode_help_mask.png | Bin 0 -> 268 bytes src/plugins/help/images/mode_help_mask@2x.png | Bin 0 -> 531 bytes .../images/build_hammerhandle_mask.png | Bin 0 -> 165 bytes .../images/build_hammerhandle_mask@2x.png | Bin 0 -> 240 bytes .../images/build_hammerhead_mask.png | Bin 0 -> 183 bytes .../images/build_hammerhead_mask@2x.png | Bin 0 -> 228 bytes .../images/debugger_beetle_mask.png | Bin 0 -> 221 bytes .../images/debugger_beetle_mask@2x.png | Bin 0 -> 436 bytes .../images/debugger_run_mask.png | Bin 0 -> 131 bytes .../images/debugger_run_mask@2x.png | Bin 0 -> 197 bytes .../images/mode_project_mask.png | Bin 0 -> 209 bytes .../images/mode_project_mask@2x.png | Bin 0 -> 359 bytes .../projectexplorer/images/run_mask.png | Bin 0 -> 177 bytes .../projectexplorer/images/run_mask@2x.png | Bin 0 -> 273 bytes .../projectexplorer/projectexplorer.cpp | 9 +- .../projectexplorer/projectexplorer.qrc | 12 + .../projectexplorer/projectexplorericons.h | 14 + src/plugins/welcome/images/mode_edit_mask.png | Bin 0 -> 189 bytes .../welcome/images/mode_welcome_mask.png | Bin 0 -> 98 bytes .../welcome/images/mode_welcome_mask@2x.png | Bin 0 -> 104 bytes src/plugins/welcome/welcome.qrc | 2 + src/plugins/welcome/welcomeplugin.cpp | 12 +- src/shared/help/helpicons.h | 6 + src/tools/icons/qtcreatoricons.svg | 390 ++++++++++++++++++ 61 files changed, 654 insertions(+), 74 deletions(-) create mode 100644 src/plugins/analyzerbase/images/mode_analyze_mask.png create mode 100644 src/plugins/analyzerbase/images/mode_analyze_mask@2x.png create mode 100644 src/plugins/coreplugin/images/mode_design_mask.png create mode 100644 src/plugins/coreplugin/images/mode_design_mask@2x.png create mode 100644 src/plugins/coreplugin/images/mode_edit_mask.png create mode 100644 src/plugins/coreplugin/images/mode_edit_mask@2x.png create mode 100644 src/plugins/debugger/images/debugger_continue@2x.png delete mode 100644 src/plugins/debugger/images/debugger_continue_32.png create mode 100644 src/plugins/debugger/images/debugger_continue_mask.png create mode 100644 src/plugins/debugger/images/debugger_continue_mask@2x.png create mode 100644 src/plugins/debugger/images/debugger_interrupt@2x.png delete mode 100644 src/plugins/debugger/images/debugger_interrupt_32.png create mode 100644 src/plugins/debugger/images/debugger_interrupt_mask.png create mode 100644 src/plugins/debugger/images/debugger_interrupt_mask@2x.png create mode 100644 src/plugins/debugger/images/mode_debug_mask.png create mode 100644 src/plugins/debugger/images/mode_debug_mask@2x.png create mode 100644 src/plugins/help/images/mode_help_mask.png create mode 100644 src/plugins/help/images/mode_help_mask@2x.png create mode 100644 src/plugins/projectexplorer/images/build_hammerhandle_mask.png create mode 100644 src/plugins/projectexplorer/images/build_hammerhandle_mask@2x.png create mode 100644 src/plugins/projectexplorer/images/build_hammerhead_mask.png create mode 100644 src/plugins/projectexplorer/images/build_hammerhead_mask@2x.png create mode 100644 src/plugins/projectexplorer/images/debugger_beetle_mask.png create mode 100644 src/plugins/projectexplorer/images/debugger_beetle_mask@2x.png create mode 100644 src/plugins/projectexplorer/images/debugger_run_mask.png create mode 100644 src/plugins/projectexplorer/images/debugger_run_mask@2x.png create mode 100644 src/plugins/projectexplorer/images/mode_project_mask.png create mode 100644 src/plugins/projectexplorer/images/mode_project_mask@2x.png create mode 100644 src/plugins/projectexplorer/images/run_mask.png create mode 100644 src/plugins/projectexplorer/images/run_mask@2x.png create mode 100644 src/plugins/welcome/images/mode_edit_mask.png create mode 100644 src/plugins/welcome/images/mode_welcome_mask.png create mode 100644 src/plugins/welcome/images/mode_welcome_mask@2x.png diff --git a/share/qtcreator/themes/dark.creatortheme b/share/qtcreator/themes/dark.creatortheme index 832a981bddb..1211ebbd168 100644 --- a/share/qtcreator/themes/dark.creatortheme +++ b/share/qtcreator/themes/dark.creatortheme @@ -49,6 +49,7 @@ FancyToolButtonHoverColor=hoverBackground FancyToolButtonSelectedColor=selectedBackground FutureProgressBackgroundColor=shadowBackground IconsBaseColor=ffdcdcdc +IconsDisabledColor=textDisabled IconsInfoColor=ff43aced IconsWarningColor=fff9ce1f IconsErrorColor=ffe8555a @@ -57,6 +58,15 @@ IconsStopColor=ffe7353b IconsDebugColor=ffb8c6ff IconsInterruptColor=ff7488db IconsNavigationArrowsColor=ffebc322 +IconsBuildHammerHandleColor=ffdd7710 +IconsBuildHammerHeadColor=ff989898 +IconsModeWelcomeActiveColor=ff80c342 +IconsModeEditActiveColor=ff99aaef +IconsModeDesignActiveColor=ffbb6000 +IconsModeDebugActiveColor=ff99aaef +IconsModeProjetcsActiveColor=ff80c342 +IconsModeAnalyzeActiveColor=ff43adee +IconsModeHelpActiveColor=fff4be04 InfoBarBackground=ff505000 InfoBarText=text MenuBarEmptyAreaBackgroundColor=shadowBackground @@ -157,6 +167,7 @@ DrawProgressBarSunken=false DrawSearchResultWidgetFrame=false DrawTargetSelectorBottom=false ApplyThemePaletteGlobally=true +FlatSideBarIcons=true [Gradients] DetailsWidgetHeaderGradient\1\color=0 diff --git a/share/qtcreator/themes/default.creatortheme b/share/qtcreator/themes/default.creatortheme index bc09f594bb5..2346a5a13ea 100644 --- a/share/qtcreator/themes/default.creatortheme +++ b/share/qtcreator/themes/default.creatortheme @@ -3,8 +3,9 @@ ThemeName=default PreferredStyles= [Palette] -brightText = ffffffff -darkText = ff000000 +brightText=ffffffff +darkText=ff000000 +textDisabled=99a0a0a0 [Colors] BackgroundColorAlternate=ff3d3d3d @@ -35,14 +36,15 @@ DoubleTabWidget2ndTabBackgroundColor=ffff0000 DoubleTabWidget2ndTabInactiveTextColor=ff000000 EditorPlaceholderColor=ffe0dcd8 FancyTabBarBackgroundColor=ffff0000 -FancyTabWidgetDisabledSelectedTextColor=ffffffff -FancyTabWidgetDisabledUnselectedTextColor=78ffffff +FancyTabWidgetDisabledSelectedTextColor=textDisabled +FancyTabWidgetDisabledUnselectedTextColor=textDisabled FancyTabWidgetEnabledSelectedTextColor=ff3c3c3c FancyTabWidgetEnabledUnselectedTextColor=ffffffff FancyToolButtonHoverColor=28ffffff FancyToolButtonSelectedColor=32000000 FutureProgressBackgroundColor=ffff0000 IconsBaseColor=ffdcdcdc +IconsDisabledColor=textDisabled IconsInfoColor=ff43aced IconsWarningColor=fff9ce1f IconsErrorColor=ffe8555a @@ -51,6 +53,15 @@ IconsStopColor=ffe7353b IconsDebugColor=ffb8c6ff IconsInterruptColor=ff7488db IconsNavigationArrowsColor=ffebc322 +IconsBuildHammerHandleColor=ffdd7710 +IconsBuildHammerHeadColor=ff989898 +IconsModeWelcomeActiveColor=ff5caa15 +IconsModeEditActiveColor=ff6a6add +IconsModeDesignActiveColor=ffbb6000 +IconsModeDebugActiveColor=ff6a6add +IconsModeProjetcsActiveColor=ff5caa15 +IconsModeAnalyzeActiveColor=ff43adee +IconsModeHelpActiveColor=fffaa836 InfoBarBackground=ffffffe1 InfoBarText=ff000000 MenuBarEmptyAreaBackgroundColor=ffff0000 @@ -151,6 +162,7 @@ DrawProgressBarSunken=true DrawSearchResultWidgetFrame=true DrawTargetSelectorBottom=true ApplyThemePaletteGlobally=false +FlatSideBarIcons=false [Gradients] DetailsWidgetHeaderGradient\1\color=ffffff diff --git a/src/libs/utils/icon.cpp b/src/libs/utils/icon.cpp index 402341a3202..8a2286698f9 100644 --- a/src/libs/utils/icon.cpp +++ b/src/libs/utils/icon.cpp @@ -39,6 +39,7 @@ #include #include #include +#include namespace Utils { @@ -211,11 +212,40 @@ QString Icon::imageFileName() const return first().first; } -Icon& Icon::operator=(const Icon &other) +QIcon Icon::sideBarIcon(const Icon &classic, const Icon &flat) { - QVector::operator =(other); - m_style = other.m_style; - return *this; + QIcon result; + if (creatorTheme()->flag(Theme::FlatSideBarIcons)) { + result = flat.icon(); + } else { + const QPixmap pixmap = classic.pixmap(); + result.addPixmap(pixmap); + // Ensure that the icon contains a disabled state of that size, since + // Since we have icons with mixed sizes (e.g. DEBUG_START), and want to + // avoid that QIcon creates scaled versions of missing QIcon::Disabled + // sizes. + result.addPixmap(StyleHelper::disabledSideBarIcon(pixmap), QIcon::Disabled); + } + return result; +} + +QIcon Icon::modeIcon(const Icon &classic, const Icon &flat, const Icon &flatActive) +{ + QIcon result = sideBarIcon(classic, flat); + if (creatorTheme()->flag(Theme::FlatSideBarIcons)) + result.addPixmap(flatActive.pixmap(), QIcon::Active); + return result; +} + +QIcon Icon::combinedIcon(const QList &icons) +{ + QIcon result; + QWindow *window = QApplication::allWidgets().first()->windowHandle(); + for (const QIcon &icon: icons) + for (const QIcon::Mode mode: {QIcon::Disabled, QIcon::Normal}) + for (const QSize &size: icon.availableSizes(mode)) + result.addPixmap(icon.pixmap(window, size, mode), mode); + return result; } } // namespace Utils diff --git a/src/libs/utils/icon.h b/src/libs/utils/icon.h index d1916aa0632..b8326ac9063 100644 --- a/src/libs/utils/icon.h +++ b/src/libs/utils/icon.h @@ -60,6 +60,7 @@ public: Icon(); Icon(std::initializer_list args, Style style = Style::TintedWithShadow); Icon(const QString &imageFileName); + Icon(const Icon &other) = default; QIcon icon() const; // Same as icon() but without disabled state. @@ -69,7 +70,14 @@ public: // where icons are still defined as filename. QString imageFileName() const; - Icon &operator=(const Icon &other); + // Returns either the classic or a themed icon depending on + // the current Theme::FlatModeIcons flag. + static QIcon sideBarIcon(const Icon &classic, const Icon &flat); + // Like sideBarIcon plus added action mode for the flat icon + static QIcon modeIcon(const Icon &classic, const Icon &flat, const Icon &flatActive); + + // Combined icon pixmaps in Normal and Disabled states from several QIcons + static QIcon combinedIcon(const QList &icons); private: Style m_style = Style::Plain; diff --git a/src/libs/utils/stylehelper.cpp b/src/libs/utils/stylehelper.cpp index 90ef68fb3bd..877ea793903 100644 --- a/src/libs/utils/stylehelper.cpp +++ b/src/libs/utils/stylehelper.cpp @@ -350,6 +350,21 @@ void StyleHelper::menuGradient(QPainter *painter, const QRect &spanRect, const Q } } +QPixmap StyleHelper::disabledSideBarIcon(const QPixmap &enabledicon) +{ + QImage im = enabledicon.toImage().convertToFormat(QImage::Format_ARGB32); + for (int y=0; y(im.scanLine(y)); + for (int x=0; xwindowHandle(); + QPixmap px = icon.pixmap(window, rect.size(), iconMode); int devicePixelRatio = qCeil(px.devicePixelRatio()); int radius = dipRadius * devicePixelRatio; QPoint offset = dipOffset * devicePixelRatio; @@ -372,51 +388,43 @@ void StyleHelper::drawIconWithShadow(const QIcon &icon, const QRect &rect, QPainter cachePainter(&cache); if (iconMode == QIcon::Disabled) { - QImage im = px.toImage().convertToFormat(QImage::Format_ARGB32); - for (int y=0; y images/mode_analyze.png images/mode_analyze@2x.png + images/mode_analyze_mask.png + images/mode_analyze_mask@2x.png images/analyzer_category.png images/analyzer_overlay_small.png images/analyzer_overlay_small@2x.png diff --git a/src/plugins/analyzerbase/analyzericons.h b/src/plugins/analyzerbase/analyzericons.h index cf6c5065e4a..4bde750f3ac 100644 --- a/src/plugins/analyzerbase/analyzericons.h +++ b/src/plugins/analyzerbase/analyzericons.h @@ -39,6 +39,12 @@ namespace Icons { const Utils::Icon ANALYZER_CONTROL_START({ {QLatin1String(":/images/analyzer_overlay_small.png"), Utils::Theme::IconsBaseColor}, {QLatin1String(":/core/images/run_overlay_small.png"), Utils::Theme::IconsRunColor}}); +const Utils::Icon MODE_ANALYZE_CLASSIC( + QLatin1String(":/images/mode_analyze.png")); +const Utils::Icon MODE_ANALYZE_FLAT({ + {QLatin1String(":/images/mode_analyze_mask.png"), Utils::Theme::IconsBaseColor}}); +const Utils::Icon MODE_ANALYZE_FLAT_ACTIVE({ + {QLatin1String(":/images/mode_analyze_mask.png"), Utils::Theme::IconsModeAnalyzeActiveColor}}); } // namespace Icons } // namespace Analyzer diff --git a/src/plugins/analyzerbase/analyzermanager.cpp b/src/plugins/analyzerbase/analyzermanager.cpp index 34b02e43711..db8d48dd5cc 100644 --- a/src/plugins/analyzerbase/analyzermanager.cpp +++ b/src/plugins/analyzerbase/analyzermanager.cpp @@ -36,7 +36,7 @@ #include "analyzerstartparameters.h" #include "ianalyzertool.h" -#include +#include #include #include #include @@ -106,7 +106,8 @@ public: { setContext(Context(C_ANALYZEMODE, C_NAVIGATION_PANE)); setDisplayName(AnalyzerManager::tr("Analyze")); - setIcon(QIcon(QLatin1String(":/images/mode_analyze.png"))); + setIcon(Utils::Icon::modeIcon(Icons::MODE_ANALYZE_CLASSIC, + Icons::MODE_ANALYZE_FLAT, Icons::MODE_ANALYZE_FLAT_ACTIVE)); setPriority(P_MODE_ANALYZE); setId(MODE_ANALYZE); } diff --git a/src/plugins/analyzerbase/images/mode_analyze_mask.png b/src/plugins/analyzerbase/images/mode_analyze_mask.png new file mode 100644 index 0000000000000000000000000000000000000000..a898c27eb6e4a42e4f4fa8a42763ca2aaaddd62c GIT binary patch literal 113 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U{GLWW?*2*lgf-|U|?Vi@Ck8cU|{(F|NqjP z^Y1b+FsOODIEHXUC;#AQ<4FnN;H)mCVMe1UrsZwP)=rM$L$Z6FesI-yZ`L5 S{5}Q-1_n=8KbLh*2~7agoF7a8 literal 0 HcmV?d00001 diff --git a/src/plugins/analyzerbase/images/mode_analyze_mask@2x.png b/src/plugins/analyzerbase/images/mode_analyze_mask@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..160b6513a10419bd8880cd9e8d2e76a39b79be7d GIT binary patch literal 123 zcmeAS@N?(olHy`uVBq!ia0y~yU`SwKU~ph$W?*2r|LcJ-0|NtFfKP}k0|UeV|NocX zoPU>rfx*Dj#W6(VeDaTe7Kt{_<86(Nja4$$DT_Ow+;I33-03`zd&Nn`gN6T3m6y}7(8A5T-G@yGywqgQ!8Bn literal 0 HcmV?d00001 diff --git a/src/plugins/coreplugin/coreicons.h b/src/plugins/coreplugin/coreicons.h index 917fc6930e3..46233ece145 100644 --- a/src/plugins/coreplugin/coreicons.h +++ b/src/plugins/coreplugin/coreicons.h @@ -148,6 +148,19 @@ const Utils::Icon ZOOM({ const Utils::Icon TOOLBAR_EXTENSION({ {QLatin1String(":/core/images/extension.png"), Utils::Theme::IconsBaseColor}}); +const Utils::Icon MODE_EDIT_CLASSIC( + QLatin1String(":/fancyactionbar/images/mode_Edit.png")); +const Utils::Icon MODE_EDIT_FLAT({ + {QLatin1String(":/fancyactionbar/images/mode_edit_mask.png"), Utils::Theme::IconsBaseColor}}); +const Utils::Icon MODE_EDIT_FLAT_ACTIVE({ + {QLatin1String(":/fancyactionbar/images/mode_edit_mask.png"), Utils::Theme::IconsModeEditActiveColor}}); +const Utils::Icon MODE_DESIGN_CLASSIC( + QLatin1String(":/fancyactionbar/images/mode_Design.png")); +const Utils::Icon MODE_DESIGN_FLAT({ + {QLatin1String(":/fancyactionbar/images/mode_design_mask.png"), Utils::Theme::IconsBaseColor}}); +const Utils::Icon MODE_DESIGN_FLAT_ACTIVE({ + {QLatin1String(":/fancyactionbar/images/mode_design_mask.png"), Utils::Theme::IconsModeDesignActiveColor}}); + } // namespace Icons } // namespace Core diff --git a/src/plugins/coreplugin/designmode.cpp b/src/plugins/coreplugin/designmode.cpp index d935ae81437..9485c819333 100644 --- a/src/plugins/coreplugin/designmode.cpp +++ b/src/plugins/coreplugin/designmode.cpp @@ -35,6 +35,8 @@ #include #include #include +#include + #include #include @@ -90,7 +92,8 @@ DesignMode::DesignMode() setContext(Context(Constants::C_DESIGN_MODE)); setWidget(d->m_stackWidget); setDisplayName(tr("Design")); - setIcon(QIcon(QLatin1String(":/fancyactionbar/images/mode_Design.png"))); + setIcon(Utils::Icon::modeIcon(Icons::MODE_DESIGN_CLASSIC, + Icons::MODE_DESIGN_FLAT, Icons::MODE_DESIGN_FLAT_ACTIVE)); setPriority(Constants::P_MODE_DESIGN); setId(Constants::MODE_DESIGN); diff --git a/src/plugins/coreplugin/editmode.cpp b/src/plugins/coreplugin/editmode.cpp index 33733c4bb5e..5d55c36b051 100644 --- a/src/plugins/coreplugin/editmode.cpp +++ b/src/plugins/coreplugin/editmode.cpp @@ -29,6 +29,7 @@ ****************************************************************************/ #include "coreconstants.h" +#include "coreicons.h" #include "editmode.h" #include "icore.h" #include "modemanager.h" @@ -53,7 +54,8 @@ EditMode::EditMode() : { setObjectName(QLatin1String("EditMode")); setDisplayName(tr("Edit")); - setIcon(QIcon(QLatin1String(":/fancyactionbar/images/mode_Edit.png"))); + setIcon(Utils::Icon::modeIcon(Icons::MODE_EDIT_CLASSIC, + Icons::MODE_EDIT_FLAT, Icons::MODE_EDIT_FLAT_ACTIVE)); setPriority(Constants::P_MODE_EDIT); setId(Constants::MODE_EDIT); diff --git a/src/plugins/coreplugin/fancyactionbar.cpp b/src/plugins/coreplugin/fancyactionbar.cpp index 5d89a184a28..ffb69bf594c 100644 --- a/src/plugins/coreplugin/fancyactionbar.cpp +++ b/src/plugins/coreplugin/fancyactionbar.cpp @@ -182,6 +182,8 @@ void FancyToolButton::paintEvent(QPaintEvent *event) painter.restore(); } + const QIcon::Mode iconMode = isEnabled() ? ((isDown() || isChecked()) ? QIcon::Active : QIcon::Normal) + : QIcon::Disabled; QRect iconRect(0, 0, Constants::TARGET_ICON_SIZE, Constants::TARGET_ICON_SIZE); // draw popup texts if (isTitledAction) { @@ -203,7 +205,7 @@ void FancyToolButton::paintEvent(QPaintEvent *event) centerRect.adjust(0, 0, 0, -lineHeight*2 - 4); iconRect.moveCenter(centerRect.center()); - StyleHelper::drawIconWithShadow(icon(), iconRect, &painter, isEnabled() ? QIcon::Normal : QIcon::Disabled); + StyleHelper::drawIconWithShadow(icon(), iconRect, &painter, iconMode); painter.setFont(normalFont); QPoint textOffset = centerRect.center() - QPoint(iconRect.width()/2, iconRect.height()/2); @@ -264,7 +266,7 @@ void FancyToolButton::paintEvent(QPaintEvent *event) } } else { iconRect.moveCenter(rect().center()); - StyleHelper::drawIconWithShadow(icon(), iconRect, &painter, isEnabled() ? QIcon::Normal : QIcon::Disabled); + StyleHelper::drawIconWithShadow(icon(), iconRect, &painter, iconMode); } } diff --git a/src/plugins/coreplugin/fancyactionbar.qrc b/src/plugins/coreplugin/fancyactionbar.qrc index 63e33279a0d..75e7599657d 100644 --- a/src/plugins/coreplugin/fancyactionbar.qrc +++ b/src/plugins/coreplugin/fancyactionbar.qrc @@ -4,5 +4,9 @@ images/mode_Edit@2x.png images/mode_Design.png images/mode_Design@2x.png + images/mode_edit_mask.png + images/mode_edit_mask@2x.png + images/mode_design_mask.png + images/mode_design_mask@2x.png diff --git a/src/plugins/coreplugin/fancytabwidget.cpp b/src/plugins/coreplugin/fancytabwidget.cpp index f4352bf62ee..5d76861b9a7 100644 --- a/src/plugins/coreplugin/fancytabwidget.cpp +++ b/src/plugins/coreplugin/fancytabwidget.cpp @@ -342,7 +342,9 @@ void FancyTabBar::paintTab(QPainter *painter, int tabIndex) const if (drawIcon) { int textHeight = painter->fontMetrics().boundingRect(QRect(0, 0, width(), height()), Qt::TextWordWrap, tabText).height(); tabIconRect.adjust(0, 4, 0, -textHeight); - StyleHelper::drawIconWithShadow(tabIcon(tabIndex), tabIconRect, painter, enabled ? QIcon::Normal : QIcon::Disabled); + const QIcon::Mode iconMode = enabled ? (selected ? QIcon::Active : QIcon::Normal) + : QIcon::Disabled; + StyleHelper::drawIconWithShadow(tabIcon(tabIndex), tabIconRect, painter, iconMode); } painter->setOpacity(1.0); //FIXME: was 0.7 before? diff --git a/src/plugins/coreplugin/images/mode_design_mask.png b/src/plugins/coreplugin/images/mode_design_mask.png new file mode 100644 index 0000000000000000000000000000000000000000..a2955133508babfa41c53a17f0266441f1946bfb GIT binary patch literal 196 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U{K&-U|?V<+`r@i0|P_1r;B5V#p&c9{z?fF zR~_dRDd3v}zdBZmRo7q6qwyk`8j zzV(ub#!Pk&g$4#Djt|!zo;+XU@Z_LYI*VOxL+UxU7j}LdnBs(2w8a~&ePFqk^|O>t zLqhztn>(1U+_e>`+VFd=j}^{j)T%Ga|FUax02&bVgIoIUruoA|ohUwPO*`%d~8dw>1PKMx^} bcaYEjaCE2g|0Bs0L80U6>gTe~DWM4f_6LgA literal 0 HcmV?d00001 diff --git a/src/plugins/coreplugin/images/mode_edit_mask.png b/src/plugins/coreplugin/images/mode_edit_mask.png new file mode 100644 index 0000000000000000000000000000000000000000..954f3abe79033fed77e9d41ea6c409444e8778df GIT binary patch literal 105 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U{GLWW?*2*lgf-|U|?Vi@Ck8cU|{(F|NqjP z^Y1b+FvxkjIEHY{O#Z>o#*-4j!?Q#4r@Y1<_9LerErfkDI5#W6%9IQd6Ei$oh|J0r)7gNgtC|7R%Uv$L%)C}6uMS5=shAW^{J%QRv3 U*2bcj3=9kmp00i_>zopr04@V0IsgCw literal 0 HcmV?d00001 diff --git a/src/plugins/debugger/debugger.qrc b/src/plugins/debugger/debugger.qrc index a61acc6d8bb..00d902ea0d9 100644 --- a/src/plugins/debugger/debugger.qrc +++ b/src/plugins/debugger/debugger.qrc @@ -3,8 +3,14 @@ images/category_debug.png images/debugger_breakpoints.png images/debugger_continue.png + images/debugger_continue@2x.png + images/debugger_continue_mask.png + images/debugger_continue_mask@2x.png images/debugger_empty_14.png images/debugger_interrupt.png + images/debugger_interrupt@2x.png + images/debugger_interrupt_mask.png + images/debugger_interrupt_mask@2x.png images/debugger_reversemode_16.png images/debugger_singleinstructionmode.png images/debugger_singleinstructionmode@2x.png @@ -30,6 +36,8 @@ images/location_24.png images/mode_debug.png images/mode_debug@2x.png + images/mode_debug_mask.png + images/mode_debug_mask@2x.png images/pin.xpm images/qml/select.png images/qml/app-on-top.png diff --git a/src/plugins/debugger/debuggericons.h b/src/plugins/debugger/debuggericons.h index 2fc4e69577d..602aa1283cd 100644 --- a/src/plugins/debugger/debuggericons.h +++ b/src/plugins/debugger/debuggericons.h @@ -50,8 +50,14 @@ const Utils::Icon TRACEPOINT( QLatin1String(":/debugger/images/tracepoint.png")); const Utils::Icon CONTINUE( QLatin1String(":/debugger/images/debugger_continue.png")); +const Utils::Icon CONTINUE_FLAT({ + {QLatin1String(":/projectexplorer/images/debugger_beetle_mask.png"), Utils::Theme::IconsDebugColor}, + {QLatin1String(":/debugger/images/debugger_continue_mask.png"), Utils::Theme::IconsRunColor}}); const Utils::Icon INTERRUPT( QLatin1String(":/debugger/images/debugger_interrupt.png")); +const Utils::Icon INTERRUPT_FLAT({ + {QLatin1String(":/projectexplorer/images/debugger_beetle_mask.png"), Utils::Theme::IconsDebugColor}, + {QLatin1String(":/debugger/images/debugger_interrupt_mask.png"), Utils::Theme::IconsInterruptColor}}); const Utils::Icon LOCATION( QLatin1String(":/debugger/images/location_16.png")); const Utils::Icon SNAPSHOT( @@ -80,6 +86,13 @@ const Utils::Icon RESTART({ const Utils::Icon SINGLE_INSTRUCTION_MODE({ {QLatin1String(":/debugger/images/debugger_singleinstructionmode.png"), Utils::Theme::IconsBaseColor}}); +const Utils::Icon MODE_DEBUGGER_CLASSIC( + QLatin1String(":/debugger/images/mode_debug.png")); +const Utils::Icon MODE_DEBUGGER_FLAT({ + {QLatin1String(":/debugger/images/mode_debug_mask.png"), Utils::Theme::IconsBaseColor}}); +const Utils::Icon MODE_DEBUGGER_FLAT_ACTIVE({ + {QLatin1String(":/debugger/images/mode_debug_mask.png"), Utils::Theme::IconsModeDebugActiveColor}}); + } // namespace Icons } // namespace Debugger diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index f3065e77d0e..3a3da49d19d 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -496,7 +496,8 @@ public: setObjectName(QLatin1String("DebugMode")); setContext(Context(C_DEBUGMODE, CC::C_NAVIGATION_PANE)); setDisplayName(DebuggerPlugin::tr("Debug")); - setIcon(QIcon(QLatin1String(":/debugger/images/mode_debug.png"))); + setIcon(Utils::Icon::modeIcon(Icons::MODE_DEBUGGER_CLASSIC, + Icons::MODE_DEBUGGER_FLAT, Icons::MODE_DEBUGGER_FLAT_ACTIVE)); setPriority(85); setId(MODE_DEBUG); } @@ -2349,10 +2350,12 @@ void DebuggerPluginPrivate::extensionsInitialized() m_startIcon = Core::Icons::DEBUG_START_SMALL.icon(); m_exitIcon = Core::Icons::DEBUG_EXIT_SMALL.icon(); - m_continueIcon = Core::Icons::DEBUG_CONTINUE_SMALL.icon(); - m_continueIcon.addPixmap(Icons::CONTINUE.pixmap()); - m_interruptIcon = Core::Icons::DEBUG_INTERRUPT_SMALL.icon(); - m_interruptIcon.addPixmap(Icons::INTERRUPT.pixmap()); + const QIcon continueSideBarIcon = + Icon::sideBarIcon(Icons::CONTINUE, Icons::CONTINUE_FLAT); + m_continueIcon = Icon::combinedIcon({Core::Icons::DEBUG_CONTINUE_SMALL.icon(), continueSideBarIcon}); + const QIcon interruptSideBarIcon = + Icon::sideBarIcon(Icons::INTERRUPT, Icons::INTERRUPT_FLAT); + m_interruptIcon = Icon::combinedIcon({Core::Icons::DEBUG_INTERRUPT_SMALL.icon(), interruptSideBarIcon}); m_locationMarkIcon = Icons::LOCATION.icon(); m_resetIcon = Icons::RESTART.icon(); @@ -2536,8 +2539,9 @@ void DebuggerPluginPrivate::extensionsInitialized() // The main "Start Debugging" action. act = m_startAction = new QAction(this); - QIcon debuggerIcon(Core::Icons::DEBUG_START_SMALL.icon()); - debuggerIcon.addPixmap(ProjectExplorer::Icons::DEBUG_START.pixmap()); + const QIcon sideBarIcon = + Icon::sideBarIcon(ProjectExplorer::Icons::DEBUG_START, ProjectExplorer::Icons::DEBUG_START_FLAT); + const QIcon debuggerIcon = Icon::combinedIcon({Core::Icons::DEBUG_START_SMALL.icon(), sideBarIcon}); act->setIcon(debuggerIcon); act->setText(tr("Start Debugging")); connect(act, &QAction::triggered, [] { ProjectExplorerPlugin::runStartupProject(ProjectExplorer::Constants::DEBUG_RUN_MODE); }); diff --git a/src/plugins/debugger/images/debugger_continue@2x.png b/src/plugins/debugger/images/debugger_continue@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..69552eb9808c0a55d6fa42e0a3e1b1770c094818 GIT binary patch literal 2271 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 diff --git a/src/plugins/debugger/images/debugger_continue_mask.png b/src/plugins/debugger/images/debugger_continue_mask.png new file mode 100644 index 0000000000000000000000000000000000000000..3784ea035b417e7999a774b6cdce35dcfb98ce22 GIT binary patch literal 190 zcmeAS@N?(olHy`uVBq!ia0y~yV2}V|4h9AWhNCh`Dhvz^t)4E9AsQ2(o;T!c3J`F; zD6M74wA#Q!afjyhgpaBA8I8L%m_?+{ZZFeWAaP;?Q~uXUlQr39cJ6OF_Vo0Ig0~{8 zSQs8%mRQxW@WGme-3q%a>+d>T(z0;+CL~z7EI{kT!%OR>%DBWnyu2mdKI;Vst0LpGk8UO$Q literal 0 HcmV?d00001 diff --git a/src/plugins/debugger/images/debugger_continue_mask@2x.png b/src/plugins/debugger/images/debugger_continue_mask@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..b883affe2236520c55440f55c3ade8433919f6ba GIT binary patch literal 339 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4h9AWhN8@6(F_cXQl2i3As)w*fA}jUNL)2o zl^Ak3;A+8!V{y}_$DUmH?n%6o$)CB)PcyJbo&G0uso?G`M%IWs$JZz7>oZFU+-UVb zY*xm`b6_X`_O{(jJP{1|>JmILC^O3%!s{x$TF8}OKS}hi_L2fmh`-VFz zAqPDZ9IMwzJvmr(J&<*M1MAccSqaRi|2l~NVG?_CY*i!sx`*+WfhVJx);zrR|9^du zWXGikOxFya{y!hU_Q=GcDfInhY37MieNIZA6B{FV|8Eu4oMOSt?Q!+P`FSq9|HTa_ tElX5p&ot9XQ9R2pEFtOf)ui-v7{l-G&5KmFJYxZcmZz(q%Q~loCIE8Fl2rfz literal 0 HcmV?d00001 diff --git a/src/plugins/debugger/images/debugger_interrupt@2x.png b/src/plugins/debugger/images/debugger_interrupt@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..6c99c073db4dcb9ece8e35a8d65b64e803a8bc84 GIT binary patch literal 1442 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4mJh`hH$2z?F@1RD#N8F@^B0s;F= zZ!@oq|M_(Jl=-h`mph0=*yv;`iu?UB(B|UcUmKj`n6m21(ar8(#GQAQIFNCH#Kgeyn=PGw0Ma9yy7=3^>XU-FO=^|H87`H*s+ShL{l&0j-9$OHO)IaS*~e7Kq;k?J_?kg? znS#;7YN73OF0yc_dfvQl&mJNg`>p!HtZ8X!(=N20crvR}g=<2^!6Jse$$2IHyB4@u zWL3P{=NiP}Q)2LmW0yd8^a)v>$A=~`KTeF)f5%y^S}fMW@>-#@;i1?i(H)Pc7SvUU zWVJMN=p2;tSnbf`P;xLO$W|g#(e2{c6{r zlPCPD(w(=`E!H~ColH{V;YqKPwHXAqeB+mPZz$$Fr@`TA(c}B}X@A?>WY+!jHYF6S zkky`cb>Wg799_#EeahsvnZ#23IBL(HROUX(s3RAfR5Pu;blx<-HfQ(#zOVYl*V5P5 zlARB$-H|O_RP>N(#_KGB&VnC*?fztLe01cvZi9t2ONN_c6N8pPZMo>oIBurP=Gu)5 z_iSO&+rIt7+2;1R>Rk&L76bn@;7fi zo_5CG==e6-i*F`Rx#!2Q=e*O7!msl;ziaq$X7lXX3abSL7%G*RQ(3mNwF&UFCB%h^ zudQ$LTP<22slU7K|Hpz>4G#Xl{W{959KsC899UMZKCogP)8d8&@|V`!H4ndb<=Uaw z(*=1}agzVF!EZNx^56gCTgWwC7Zxt13n4-m z%NZs#6?IxHXE?Z_Yr~qOa`g_4$Mp}V7&&sW6yAT@sFOV*mAAAsZO+fd#d{syJ6oE1 zzkRx~)9>o;srDL+C!FiN+2W$>(AicH;aXa1`YWIJKu#Q=E8n7&IM$lFol37+p4FFs zIml=|J8;VRJKwCGLruM>A2+j>O7&3Z5ad!7arpf`-Z50Az(8S=dq`-j0>@3o2`8_z zGu+s<>$bIC+$t^I=#HjEk8bRnxZ=o(2c{+Q|0G#|7B4oJ6FKU{BDbDj^l9qN)r~I` zHbw-59jW=;Z5kc_KD5VDc7iDHCZUUe*JXUDvfWYg%p%0KHJI6;>RaWZZj(`jI;~fo5Hy;$J2##@&uuSE^*gvc78h6`1g02%#Ho}*3*~I`Rp^l zX8w8h<(DmA{+>2%TE3f`+X2htFS+-=^_@L`d;a~cyNiFXyE`|&uJ*}|lFw3}3U8A) z-!yP+DDDf7yPG`sWQB9Lh4%I5n+wHGDYk>lx&K=KSdG~yK5!HGypMr_fx*+&&t;uc GLK6Tc$eT_8 literal 0 HcmV?d00001 diff --git a/src/plugins/debugger/images/debugger_interrupt_32.png b/src/plugins/debugger/images/debugger_interrupt_32.png deleted file mode 100644 index 7b74a586ab933a6d0314b7c50d00b205215191d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1428 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}k|nMYCBgY=CFO}lsSJ)O z`AMk?p1FzXsX?iUDV2pMQ*9U+Sj{|L978H@9SO_M5eXIf_wJ0&()?RO8QeMD(^y?5 zI0$=t2@3o4NOb%W_?u{=m5}6A(=ubm42iG(Z32r8m)ZYF)>-7V;v$<#D+`bQ^mR*J zHSPv^dryBSR(89#Jgw}w@#gn;ZKgt^Jg71N{+So=d389n8NOSj{UQW zCQIg!Xhw+YT`LE^~T!8_4M-LS_^Qf#$`8DNL#PhF-8isvI zmwjwLZL&0H)@0CG%~EN4;<$B#>Z@}>s>WOmg*w{5Z&+xYeo=a-S*Y{HnkSccHKb-e zYm`XPJh<`-pHI~V^M`FBp%)fBd1tM|?y#u&26GAHe62=xlV-6;WshQ{BRo1cJDfKQWFJO_o#FZ~}Vb>P1+wxIM*S?pK(w1p(;tF5E(z8@n z?PvDSi!+ipJ$a(3?dG<7Lzb(s)~VA9t|>8gxkpPB7`$Is?b(ql+$SZJ7*pUAe(~f^ z`I!BdK|8=ZT7j-@9zIwvBGWdmoujr9%nYq+I!$=M1ZN{k$GC& zt8V_vTbGxS({f#3No1Pftcfe1DKRN>rX@8mE_FVvEU=U#?ZowU)jZFRiC&#w_wnsY zOYa4&YUddR>sN_!bc!ykRE>HdX*j8*KH!i^qtWcM94yW|-p_0EcpsXdwdui`_qNj9 zce*aKh`)dOWT(pIpAL5)EjQjjW%l$XGmqY$lFZW9aP|82T*S<9~zFWNOxn`;pKl9F-9TrY{j2(p&4mp<8{ufQrbZD2FsvmVE z#VWMb#!7%|r&adu)cpAH??=5$r-pV128GSLV}5C-g#6C7eW&dgFR9qK?U>6`9q~mo zzWoXaj-49MTs-q?mTRcw`{)R{jr@EuN0*#l+37oF(Z;IFH(t*@w$%8zMzQ2Shk(xx z1`Lrri$7o24hvngD|dy4*TLJ*-rnB6@&5t!zmM~5lJcTXU)8OY_}uMns@C?;s(+&N z^NkBuN%(jXzDYeTaa_OK%UH)}sppfe?=D_7zjtqczWC06;ad-{ zFwp<@v!-BYjO6>Ju++Ub#4hfq{X+)78&qol`;+0A<~vvH$=8 diff --git a/src/plugins/debugger/images/debugger_interrupt_mask.png b/src/plugins/debugger/images/debugger_interrupt_mask.png new file mode 100644 index 0000000000000000000000000000000000000000..c2081ca1360ba43fb4ef8becdd5499b993b28716 GIT binary patch literal 96 zcmeAS@N?(olHy`uVBq!ia0y~yV2}V|MrH;EhFd$=?`B|NU<>dGab;j&`2YX^(wp<| zGB7ZRdb&7FNE3=Ao48Z)!Lr~hDJU|{fc^>bP0l+XkKpI;p! literal 0 HcmV?d00001 diff --git a/src/plugins/debugger/images/debugger_interrupt_mask@2x.png b/src/plugins/debugger/images/debugger_interrupt_mask@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..43aec6f9cc294378666b861df7108c9a8f6a29e1 GIT binary patch literal 97 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-MrH;EhTJpRM;I6w*aCb)Tp1V`{{R2K^yd7# z3=9lno-U3d65+`|_}O@xCtD>Pwo%b&SyQ** zho+&y2b2H#&k_>?glrvJCO0_DeO9%gx==c7v5Q{%6^5L?PS!B8&6*!lrY%z z|4^P`jB=)k6w?7dlete76-qKT&ON;~Q?{*Pq0v`~GFArX=CDu9439!5tvSZX@NW{^ z*$FQkuD>Y@KRIRZrIMMGzRuXIUj41uXZox~rs)Z>IX=qg4onfb&}7`OOrYQin+!K& zcHV(qEEA46urV-r?`L~f$0j5+KjSp-4Y5}bZt?CAWLh)9*dWhSb_;KMLhu`v`PR(h zNevH+nQGcZ63$ugKbYgrW*|Jnr=I MUHx3vIVCg!0Bkh3rvLx| literal 0 HcmV?d00001 diff --git a/src/plugins/help/help.qrc b/src/plugins/help/help.qrc index f38a578e14c..a0b727d945b 100644 --- a/src/plugins/help/help.qrc +++ b/src/plugins/help/help.qrc @@ -7,6 +7,8 @@ images/category_help.png images/mode_help.png images/mode_help@2x.png + images/mode_help_mask.png + images/mode_help_mask@2x.png images/mac/addtab.png diff --git a/src/plugins/help/helpmode.cpp b/src/plugins/help/helpmode.cpp index 98042ce8d8f..ab53166bc59 100644 --- a/src/plugins/help/helpmode.cpp +++ b/src/plugins/help/helpmode.cpp @@ -30,6 +30,7 @@ #include "helpmode.h" #include "helpconstants.h" +#include "helpicons.h" #include @@ -41,7 +42,8 @@ HelpMode::HelpMode(QObject *parent) { setObjectName(QLatin1String("HelpMode")); setContext(Core::Context(Constants::C_MODE_HELP)); - setIcon(QIcon(QLatin1String(":/help/images/mode_help.png"))); + setIcon(Utils::Icon::modeIcon(Icons::MODE_HELP_CLASSIC, + Icons::MODE_HELP_FLAT, Icons::MODE_HELP_FLAT_ACTIVE)); setDisplayName(QCoreApplication::translate("Help::Internal::HelpMode", "Help")); setPriority(Constants::P_MODE_HELP); setId(Constants::ID_MODE_HELP); diff --git a/src/plugins/help/images/mode_help_mask.png b/src/plugins/help/images/mode_help_mask.png new file mode 100644 index 0000000000000000000000000000000000000000..9924e734167578dc388c7d7d36238a6e3d52d6ea GIT binary patch literal 268 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U{K&-U|?V<+`r@i0|UclPZ!4!i_^(J{FM?U zt~!|WPXDxJ=gzI4^@UeHbXOB*mM}>Fui|!?-+e=tp1{K|lR0=L9a`U9-uGvJ3UA62 zfolbvPv+hG&z}CL<|tpuRnaD?PmX>!D<<_OeyfjFSUq6@n{G$DR(325f7*BR(fz^pO?j> zO$Vj&Y9=!WR=OPd;-5ajD=%P%(T+b#Y9IfeNo-Twwt<8 literal 0 HcmV?d00001 diff --git a/src/plugins/help/images/mode_help_mask@2x.png b/src/plugins/help/images/mode_help_mask@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..213bfc65aadcd8fb6529fb7e6fa0881ed6afc2c6 GIT binary patch literal 531 zcmeAS@N?(olHy`uVBq!ia0y~yU`SwKU~u4IU|?W45U+cQfr0Usr;B4q#NoHs&ubq} zlwtqiezV-L^VYO2mKFg!EY75{t7~4GR1|W{-+SVgM~BXSa^G>Te{%hSK)Z~r{sMb95EdS3jy=2hkXUv{?l<9X_1e3*nLG_a_AIN$I*Fn)S__uRIC1&ncD z|7QB%W7=^$=W5wXC#E$SKlg5b_2kl0ziXNeYs%_o>3zMq&?-w)fWh%C(=>)TKi*FM z&hYDMWQ}(rQjZ!~AN1~4n{OcSup#w9qx6xMMp?b}>1k>Qc)ztaPU@`z@g6YKzMheM$z3v=FOnk_H^}gS?83{1OTB!`RV`w literal 0 HcmV?d00001 diff --git a/src/plugins/projectexplorer/images/build_hammerhandle_mask.png b/src/plugins/projectexplorer/images/build_hammerhandle_mask.png new file mode 100644 index 0000000000000000000000000000000000000000..8759e4204fc9d26f1b37c6ede75787b35a310bbf GIT binary patch literal 165 zcmeAS@N?(olHy`uVBq!ia0y~yV2}V|4h9AWhNCh`Dhvz^Ii4<#AsXkCfAljOT=01$ z&(|q^EPSKaoe8Pac6GTvnq^|V`9Pr$=Yp!Vea$o67IrDCTsZPj=*1%gPM*RQM|dSm z3OiWD3OBGs{1HftNEBuFN)Z2lzQOsA{b9Mhw1deJkCV6mP?Qn;+Uixv$57YEw6JcE QfH25@Pgg&ebxsLQ026#VJOBUy literal 0 HcmV?d00001 diff --git a/src/plugins/projectexplorer/images/build_hammerhandle_mask@2x.png b/src/plugins/projectexplorer/images/build_hammerhandle_mask@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..04304d35f82d66c779a4f7c987884a0b81422870 GIT binary patch literal 240 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4h9AWhN8@6(F_a>+dW+zLp+YZy=cwHWXRL< zaAJ|zHx`A1xi`A1^+j1bn#`<466c?^dd#O7Q@=m;H$6>uFTBLoSdB8+}y&# z!WtSHy1KfXH*em#bLZZ@d(WIX^YrP{7cXA?|NsBaA^xKb3=H0$E{-7*;mH=vEX$cC zBy<{0m^+How3(Sd%Sf@| zDS3H$O`A4t_Uzer@7{g<`0d~UMUq=_WP1=#+=w}nvpvbPagg5uV hXYPVSE&CrbZk+bcUi`wbZUzPh22WQ%mvv4FO#l$xyRxE%$8@Qd=IVx{7blCZD=pCu%NEc6n`Hoh=~5eq@S-M8&NC zrUk|Z8r`x^Mp=5y9Dmp*b5D4?!hKSP+q43QNd=A`I*ADmlM)glIxjrzR}t*VxniTz z>3Txwyr59e`UxukTuvNNO-cHvpptjIK3N4De$vJ_blIvMldMY*$~^PqWozDknwL}#=WlC!*O$@;tUfnANV9Uy{%vDM(&1xEwP8)z1dvreRvOU;@K9zAuA&> zpyEUQOoLTy7eoKQKVkGG>1u)Ye?^VM>3@J p{^#F%XKj3YQLE9a#1Lj428NPFPi=OloSY7d4o_D(I`QHff@M!%m@Gvkqwhttsu(8X8Gsf-V2AS!_g%twf f6Ikq2m2NOboc^%RX4c}jAk#fv{an^LB{Ts515hc% literal 0 HcmV?d00001 diff --git a/src/plugins/projectexplorer/images/debugger_run_mask@2x.png b/src/plugins/projectexplorer/images/debugger_run_mask@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..978d099a9c51654af8893b3feac4a5dfeb937f80 GIT binary patch literal 197 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4h9AWhN8@6(F_a>J)SO(As)w*fA}jUNL)2o zl^DXzYx2WJDUg}@f6M+QnF$FSc6lvgW4rcA9>fW_>Ar}K?bwa&AkKsc*F|h>Y*Pf( z+?c&MgqJc}wsc-;;7Cj|J>Wc}g7<=enj^DHOXkYP5cP>KGJ~3@9_dgv&73gfhlkI- tC20ymn>ALpGISp0S;-pt;BuqZUdGV$!#h43f7b-L&(qbiXZhkrL-g@9{rp2NF|c3&D-HsI`c%Se};wz7PWu>U-q98 zAuS>)AtBTM(?CLK<->I>%q(97mp@#m6SDVq{vwlxtJ*I)UVZterZq)QgW>9Gdu6L- zA6Fe;#JIo8hnM9_au&lfMYgr#Doer~+1SpCFHw1a^wK+hH}1xR>lqntep#vSwXj+i O(9e22Iqz(bQY;@3UpdHV2lRgFZWc&f0cm>jUW}~Q4N{@Dpx&A;rU!UKVa*MhS}$@%vhtWku;%v)~?h*(K~-wO;#G6 zG@T#8eZp+M2lol{`4-$72J%?$`hN0a+c|;UZn_d%6RtD`a%(U%lrLWNlK0|j Q1yBfjy85}Sb4q9e0LTxN;s5{u literal 0 HcmV?d00001 diff --git a/src/plugins/projectexplorer/images/run_mask.png b/src/plugins/projectexplorer/images/run_mask.png new file mode 100644 index 0000000000000000000000000000000000000000..aaaf05ce22d23ce271d836378787779924844c33 GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0y~yV2}V|4h9AWhNCh`Dhvz^6`n4RAsXkCfBgTy|NP(o zGa49MEMM0rOixG%xZCO6)Ohf@As;8(KhF9M-UbE|a>o@99uWD>wwr~y`NNs|8>$i# zZ`M7SkdScpcTa3nqhpn#UT3I^Wb5IgkFEbbJ}!93xyDhcL0P~#KB0d_tcvT}`^++( djM@h@85veImml_?DXj`}i>Irf%Q~loCIE$mLN@>a literal 0 HcmV?d00001 diff --git a/src/plugins/projectexplorer/images/run_mask@2x.png b/src/plugins/projectexplorer/images/run_mask@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..38f6445c2528350fa07487e4f47d274bc9fc4f1d GIT binary patch literal 273 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4h9AWhN8@6(F_a>H#}V&Lp+Wr|KMk{`~F{; zQ(}Qg`d|J_CI$v8-l+sKGdG`47BV&X;QzyU78@Je;m0aj2?<@bV9vvt|2-}rIFL}@ z>cY#jrgFaLap^e-T?uC+l`LnNHUEY->7M_p|AAwl=VxIpP$+T$QA_ zhEaE;z+y(#jRMOVH8%>ZWSkh$aeYJAGC!q@mmhKezi9M`$A7{U6BZAjnuYovryX`@ z%yRYAVM*X@bYqq5bXE0oT2NQmKTm)oLqK8UsY8setOnAllDisabledBehavior(ActionContainer::Hide); - QIcon runIcon = Icons::RUN.icon(); + QIcon runIcon = Utils::Icon::sideBarIcon(Icons::RUN, Icons::RUN_FLAT); runIcon.addPixmap(Icons::RUN_SMALL.pixmap()); runMenu->menu()->setIcon(runIcon); runMenu->menu()->setTitle(tr("Run")); @@ -839,8 +840,8 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er msessionContextMenu->addAction(cmd, Constants::G_SESSION_FILES); // build session action - QIcon buildIcon = Icons::BUILD.icon(); - buildIcon.addPixmap(Icons::BUILD_SMALL.pixmap()); + const QIcon sideBarIcon = Utils::Icon::sideBarIcon(Icons::BUILD, Icons::BUILD_FLAT); + const QIcon buildIcon = Utils::Icon::combinedIcon({Icons::BUILD_SMALL.icon(), sideBarIcon}); dd->m_buildSessionAction = new QAction(buildIcon, tr("Build All"), this); cmd = ActionManager::registerAction(dd->m_buildSessionAction, Constants::BUILDSESSION); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+B"))); diff --git a/src/plugins/projectexplorer/projectexplorer.qrc b/src/plugins/projectexplorer/projectexplorer.qrc index 43524be6ba5..6a730cb0d0e 100644 --- a/src/plugins/projectexplorer/projectexplorer.qrc +++ b/src/plugins/projectexplorer/projectexplorer.qrc @@ -7,13 +7,21 @@ images/closetab.png images/debugger_start.png images/debugger_start@2x.png + images/debugger_beetle_mask.png + images/debugger_beetle_mask@2x.png + images/debugger_run_mask.png + images/debugger_run_mask@2x.png images/mode_project.png images/mode_project@2x.png + images/mode_project_mask.png + images/mode_project_mask@2x.png images/projectexplorer.png images/rebuild.png images/rebuild_small.png images/run.png images/run@2x.png + images/run_mask.png + images/run_mask@2x.png images/run_small.png images/run_small@2x.png images/session.png @@ -35,6 +43,10 @@ images/DeviceReadyToUse.png images/build.png images/build@2x.png + images/build_hammerhandle_mask.png + images/build_hammerhandle_mask@2x.png + images/build_hammerhead_mask.png + images/build_hammerhead_mask@2x.png images/targetpanel_bottom.png images/targetpanel_gradient.png images/window.png diff --git a/src/plugins/projectexplorer/projectexplorericons.h b/src/plugins/projectexplorer/projectexplorericons.h index 604bddd024e..883d5436a1f 100644 --- a/src/plugins/projectexplorer/projectexplorericons.h +++ b/src/plugins/projectexplorer/projectexplorericons.h @@ -38,6 +38,9 @@ namespace Icons { const Utils::Icon BUILD( QLatin1String(":/projectexplorer/images/build.png")); +const Utils::Icon BUILD_FLAT({ + {QLatin1String(":/projectexplorer/images/build_hammerhandle_mask.png"), Utils::Theme::IconsBuildHammerHandleColor}, + {QLatin1String(":/projectexplorer/images/build_hammerhead_mask.png"), Utils::Theme::IconsBuildHammerHeadColor}}); const Utils::Icon BUILD_SMALL( QLatin1String(":/projectexplorer/images/build_small.png")); const Utils::Icon CLEAN( @@ -50,15 +53,26 @@ const Utils::Icon REBUILD_SMALL( QLatin1String(":/projectexplorer/images/rebuild_small.png")); const Utils::Icon RUN( QLatin1String(":/projectexplorer/images/run.png")); +const Utils::Icon RUN_FLAT({ + {QLatin1String(":/projectexplorer/images/run_mask.png"), Utils::Theme::IconsRunColor}}); const Utils::Icon WINDOW( QLatin1String(":/projectexplorer/images/window.png")); const Utils::Icon DEBUG_START( QLatin1String(":/projectexplorer/images/debugger_start.png")); +const Utils::Icon DEBUG_START_FLAT({ + {QLatin1String(":/projectexplorer/images/debugger_beetle_mask.png"), Utils::Theme::IconsDebugColor}, + {QLatin1String(":/projectexplorer/images/debugger_run_mask.png"), Utils::Theme::IconsRunColor}}); const Utils::Icon RUN_SMALL({ {QLatin1String(":/projectexplorer/images/run_small.png"), Utils::Theme::IconsRunColor}}); const Utils::Icon STOP_SMALL({ {QLatin1String(":/projectexplorer/images/stop_small.png"), Utils::Theme::IconsStopColor}}); +const Utils::Icon MODE_PROJECT_CLASSIC( + QLatin1String(":/projectexplorer/images/mode_project.png")); +const Utils::Icon MODE_PROJECT_FLAT({ + {QLatin1String(":/projectexplorer/images/mode_project_mask.png"), Utils::Theme::IconsBaseColor}}); +const Utils::Icon MODE_PROJECT_FLAT_ACTIVE({ + {QLatin1String(":/projectexplorer/images/mode_project_mask.png"), Utils::Theme::IconsModeProjetcsActiveColor}}); } // namespace Icons } // namespace ProjectExplorer diff --git a/src/plugins/welcome/images/mode_edit_mask.png b/src/plugins/welcome/images/mode_edit_mask.png new file mode 100644 index 0000000000000000000000000000000000000000..221f49151933146e4b2c14b3632e08e750ea46a3 GIT binary patch literal 189 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7Sc;uILpV4%IBGajIv5xj zI14-?iy0VruY)k7lg8`{1_lPn64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xh zq!<_&tUO&DLo9leQxXz>oOfVMSmg5gfk6Z7%+LSr3lAPVaiSx^I6$I9WhcYUXN`r7 mX483^4J3X{vG~Boz@WTUP`*uP4Ko7+1B0ilpUXO@geCwV!#Q*S literal 0 HcmV?d00001 diff --git a/src/plugins/welcome/images/mode_welcome_mask.png b/src/plugins/welcome/images/mode_welcome_mask.png new file mode 100644 index 0000000000000000000000000000000000000000..d0183d3e79f586155ade0716ae60a11526580fc7 GIT binary patch literal 98 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U{GLWW?*2*lgf-|U|?Vi@Ck8cU|{(F|NqjP z^Y1b+Fo=7)IEHXUC;#AQ<4FmyVcVg3YqiQGCWg{`t29?Q^foXsFfe$!`njxgN@xNA DD47}U literal 0 HcmV?d00001 diff --git a/src/plugins/welcome/images/mode_welcome_mask@2x.png b/src/plugins/welcome/images/mode_welcome_mask@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..b9189b3efb40a68fe45a599453461512ff8975cd GIT binary patch literal 104 zcmeAS@N?(olHy`uVBq!ia0y~yU`SwKU~ph$W?*2r|LcJ-0|NtFfKP}k0|UeV|NocX zoPU>rfkD>O#W6%&%(fPb^A^v)&8ErD@Z{Lm^aY33En;9`VDNPH Kb6Mw<&;$UWz#umO literal 0 HcmV?d00001 diff --git a/src/plugins/welcome/welcome.qrc b/src/plugins/welcome/welcome.qrc index 05531f04b1d..3d8bff335f2 100644 --- a/src/plugins/welcome/welcome.qrc +++ b/src/plugins/welcome/welcome.qrc @@ -2,5 +2,7 @@ images/mode_welcome.png images/mode_welcome@2x.png + images/mode_welcome_mask.png + images/mode_welcome_mask@2x.png diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp index 7a64fde5beb..26b0aed55d5 100644 --- a/src/plugins/welcome/welcomeplugin.cpp +++ b/src/plugins/welcome/welcomeplugin.cpp @@ -40,6 +40,7 @@ #include #include +#include #include #include #include @@ -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")); diff --git a/src/shared/help/helpicons.h b/src/shared/help/helpicons.h index 4cd72deb336..957d65bbd9f 100644 --- a/src/shared/help/helpicons.h +++ b/src/shared/help/helpicons.h @@ -40,6 +40,12 @@ const Utils::Icon BOOKMARK( QLatin1String(":/help/images/bookmark.png")); const Utils::Icon HOME( QLatin1String(":/help/images/home.png")); +const Utils::Icon MODE_HELP_CLASSIC( + QLatin1String(":/help/images/mode_help.png")); +const Utils::Icon MODE_HELP_FLAT({ + {QLatin1String(":/help/images/mode_help_mask.png"), Utils::Theme::IconsBaseColor}}); +const Utils::Icon MODE_HELP_FLAT_ACTIVE({ + {QLatin1String(":/help/images/mode_help_mask.png"), Utils::Theme::IconsModeHelpActiveColor}}); } // namespace Icons } // namespace Help diff --git a/src/tools/icons/qtcreatoricons.svg b/src/tools/icons/qtcreatoricons.svg index be39a7746d3..f4bfbb5a06f 100644 --- a/src/tools/icons/qtcreatoricons.svg +++ b/src/tools/icons/qtcreatoricons.svg @@ -3584,4 +3584,394 @@ height="600" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +