diff --git a/src/plugins/todo/todoicons.cpp b/src/plugins/todo/todoicons.cpp index e2f9613c784..9d64a7236ec 100644 --- a/src/plugins/todo/todoicons.cpp +++ b/src/plugins/todo/todoicons.cpp @@ -49,7 +49,7 @@ QIcon icon(IconType type) const static QIcon icon = Icon({ {":/todoplugin/images/bugfill.png", Theme::BackgroundColorNormal}, - {":/todoplugin/images/bug.png", Theme::IconsInterruptToolBarColor} + {":/todoplugin/images/bug.png", Theme::IconsInterruptColor} }, Icon::Tint).icon(); return icon; @@ -57,7 +57,7 @@ QIcon icon(IconType type) case IconType::Todo: { const static QIcon icon = Icon({ - {":/todoplugin/images/tasklist.png", Theme::IconsRunToolBarColor} + {":/todoplugin/images/tasklist.png", Theme::IconsRunColor} }, Icon::Tint).icon(); return icon; } @@ -70,5 +70,22 @@ QIcon icon(IconType type) } } +QIcon toolBarIcon(IconType type) +{ + switch (type) { + case IconType::Info: + return Icons::INFO_TOOLBAR.icon(); + case IconType::Warning: + return Icons::WARNING_TOOLBAR.icon(); + case IconType::Bug: + return Icon({{":/todoplugin/images/bug.png", Theme::IconsInterruptToolBarColor}}).icon(); + case IconType::Todo: + return Icon({{":/todoplugin/images/tasklist.png", Theme::IconsRunToolBarColor}}).icon(); + default: + case IconType::Error: + return Icons::ERROR_TOOLBAR.icon(); + } +} + } // namespace Internal } // namespace Todo diff --git a/src/plugins/todo/todoicons.h b/src/plugins/todo/todoicons.h index 23cb15d951c..99c29ff6188 100644 --- a/src/plugins/todo/todoicons.h +++ b/src/plugins/todo/todoicons.h @@ -40,6 +40,7 @@ enum class IconType { }; QIcon icon(IconType type); +QIcon toolBarIcon(IconType type); } // namespace Internal } // namespace Todo diff --git a/src/plugins/todo/todooutputpane.cpp b/src/plugins/todo/todooutputpane.cpp index 8add645b073..fab4a658395 100644 --- a/src/plugins/todo/todooutputpane.cpp +++ b/src/plugins/todo/todooutputpane.cpp @@ -279,7 +279,7 @@ void TodoOutputPane::createScopeButtons() QString tooltip = tr("Show \"%1\" entries"); for (const Keyword &keyword: m_settings->keywords) { - QToolButton *button = createCheckableToolButton(keyword.name, tooltip.arg(keyword.name), icon(keyword.iconType)); + QToolButton *button = createCheckableToolButton(keyword.name, tooltip.arg(keyword.name), toolBarIcon(keyword.iconType)); button->setProperty(Constants::FILTER_KEYWORD_NAME, keyword.name); button->setToolButtonStyle(Qt::ToolButtonIconOnly); connect(button, &QToolButton::clicked, this, &TodoOutputPane::updateFilter);