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 00000000000..a898c27eb6e Binary files /dev/null and b/src/plugins/analyzerbase/images/mode_analyze_mask.png differ 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 00000000000..160b6513a10 Binary files /dev/null and b/src/plugins/analyzerbase/images/mode_analyze_mask@2x.png differ 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 00000000000..a2955133508 Binary files /dev/null and b/src/plugins/coreplugin/images/mode_design_mask.png differ diff --git a/src/plugins/coreplugin/images/mode_design_mask@2x.png b/src/plugins/coreplugin/images/mode_design_mask@2x.png new file mode 100644 index 00000000000..99d95b7a4d0 Binary files /dev/null and b/src/plugins/coreplugin/images/mode_design_mask@2x.png differ 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 00000000000..954f3abe790 Binary files /dev/null and b/src/plugins/coreplugin/images/mode_edit_mask.png differ diff --git a/src/plugins/coreplugin/images/mode_edit_mask@2x.png b/src/plugins/coreplugin/images/mode_edit_mask@2x.png new file mode 100644 index 00000000000..b70cbcb71b4 Binary files /dev/null and b/src/plugins/coreplugin/images/mode_edit_mask@2x.png differ 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 00000000000..69552eb9808 Binary files /dev/null and b/src/plugins/debugger/images/debugger_continue@2x.png differ diff --git a/src/plugins/debugger/images/debugger_continue_32.png b/src/plugins/debugger/images/debugger_continue_32.png deleted file mode 100644 index 1208cbf0cc2..00000000000 Binary files a/src/plugins/debugger/images/debugger_continue_32.png and /dev/null differ 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 00000000000..3784ea035b4 Binary files /dev/null and b/src/plugins/debugger/images/debugger_continue_mask.png differ 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 00000000000..b883affe223 Binary files /dev/null and b/src/plugins/debugger/images/debugger_continue_mask@2x.png differ 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 00000000000..6c99c073db4 Binary files /dev/null and b/src/plugins/debugger/images/debugger_interrupt@2x.png differ 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 7b74a586ab9..00000000000 Binary files a/src/plugins/debugger/images/debugger_interrupt_32.png and /dev/null differ 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 00000000000..c2081ca1360 Binary files /dev/null and b/src/plugins/debugger/images/debugger_interrupt_mask.png differ 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 00000000000..43aec6f9cc2 Binary files /dev/null and b/src/plugins/debugger/images/debugger_interrupt_mask@2x.png differ diff --git a/src/plugins/debugger/images/mode_debug_mask.png b/src/plugins/debugger/images/mode_debug_mask.png new file mode 100644 index 00000000000..ea9b364994f Binary files /dev/null and b/src/plugins/debugger/images/mode_debug_mask.png differ diff --git a/src/plugins/debugger/images/mode_debug_mask@2x.png b/src/plugins/debugger/images/mode_debug_mask@2x.png new file mode 100644 index 00000000000..63e2fe5f99c Binary files /dev/null and b/src/plugins/debugger/images/mode_debug_mask@2x.png differ 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 00000000000..9924e734167 Binary files /dev/null and b/src/plugins/help/images/mode_help_mask.png differ 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 00000000000..213bfc65aad Binary files /dev/null and b/src/plugins/help/images/mode_help_mask@2x.png differ 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 00000000000..8759e4204fc Binary files /dev/null and b/src/plugins/projectexplorer/images/build_hammerhandle_mask.png differ 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 00000000000..04304d35f82 Binary files /dev/null and b/src/plugins/projectexplorer/images/build_hammerhandle_mask@2x.png differ diff --git a/src/plugins/projectexplorer/images/build_hammerhead_mask.png b/src/plugins/projectexplorer/images/build_hammerhead_mask.png new file mode 100644 index 00000000000..31a174fd177 Binary files /dev/null and b/src/plugins/projectexplorer/images/build_hammerhead_mask.png differ diff --git a/src/plugins/projectexplorer/images/build_hammerhead_mask@2x.png b/src/plugins/projectexplorer/images/build_hammerhead_mask@2x.png new file mode 100644 index 00000000000..4bc0b4b7fc8 Binary files /dev/null and b/src/plugins/projectexplorer/images/build_hammerhead_mask@2x.png differ diff --git a/src/plugins/projectexplorer/images/debugger_beetle_mask.png b/src/plugins/projectexplorer/images/debugger_beetle_mask.png new file mode 100644 index 00000000000..359b6cc425b Binary files /dev/null and b/src/plugins/projectexplorer/images/debugger_beetle_mask.png differ diff --git a/src/plugins/projectexplorer/images/debugger_beetle_mask@2x.png b/src/plugins/projectexplorer/images/debugger_beetle_mask@2x.png new file mode 100644 index 00000000000..24a5f3b7bc0 Binary files /dev/null and b/src/plugins/projectexplorer/images/debugger_beetle_mask@2x.png differ diff --git a/src/plugins/projectexplorer/images/debugger_run_mask.png b/src/plugins/projectexplorer/images/debugger_run_mask.png new file mode 100644 index 00000000000..0e3ab010d0a Binary files /dev/null and b/src/plugins/projectexplorer/images/debugger_run_mask.png differ 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 00000000000..978d099a9c5 Binary files /dev/null and b/src/plugins/projectexplorer/images/debugger_run_mask@2x.png differ diff --git a/src/plugins/projectexplorer/images/mode_project_mask.png b/src/plugins/projectexplorer/images/mode_project_mask.png new file mode 100644 index 00000000000..f3098ca6f89 Binary files /dev/null and b/src/plugins/projectexplorer/images/mode_project_mask.png differ diff --git a/src/plugins/projectexplorer/images/mode_project_mask@2x.png b/src/plugins/projectexplorer/images/mode_project_mask@2x.png new file mode 100644 index 00000000000..88e203caea5 Binary files /dev/null and b/src/plugins/projectexplorer/images/mode_project_mask@2x.png differ diff --git a/src/plugins/projectexplorer/images/run_mask.png b/src/plugins/projectexplorer/images/run_mask.png new file mode 100644 index 00000000000..aaaf05ce22d Binary files /dev/null and b/src/plugins/projectexplorer/images/run_mask.png differ 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 00000000000..38f6445c252 Binary files /dev/null and b/src/plugins/projectexplorer/images/run_mask@2x.png differ diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index bd6aaa3af8f..4636fea507c 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -396,7 +396,8 @@ public: setWidget(proWindow); setContext(Context(Constants::C_PROJECTEXPLORER)); setDisplayName(QCoreApplication::translate("ProjectExplorer::ProjectsMode", "Projects")); - setIcon(QIcon(QLatin1String(":/projectexplorer/images/mode_project.png"))); + setIcon(Utils::Icon::modeIcon(Icons::MODE_PROJECT_CLASSIC, + Icons::MODE_PROJECT_FLAT, Icons::MODE_PROJECT_FLAT_ACTIVE)); setPriority(Constants::P_MODE_SESSION); setId(Constants::MODE_SESSION); setContextHelpId(QLatin1String("Managing Projects")); @@ -704,7 +705,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er ActionContainer *runMenu = ActionManager::createMenu(Constants::RUNMENUCONTEXTMENU); runMenu->setOnAllDisabledBehavior(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 00000000000..221f4915193 Binary files /dev/null and b/src/plugins/welcome/images/mode_edit_mask.png differ 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 00000000000..d0183d3e79f Binary files /dev/null and b/src/plugins/welcome/images/mode_welcome_mask.png differ 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 00000000000..b9189b3efb4 Binary files /dev/null and b/src/plugins/welcome/images/mode_welcome_mask@2x.png differ 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" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +