From 060d47f3175efb9579387b6f1c71c15d8fc3778b Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Tue, 1 Oct 2019 00:20:07 +0200 Subject: [PATCH] QmlDesigner: Fix colors of +/- icons in TimelineWidget In non-dark themes, icons outside toolbars requre a color role with contrast against the background. Task-number: QDS-1096 Change-Id: I10e1c77a71e77a2935844507c9ebe739065a69ef Reviewed-by: Thomas Hartmann --- .../qmldesigner/components/timelineeditor/timelineicons.h | 6 +++++- .../components/timelineeditor/timelinewidget.cpp | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelineicons.h b/src/plugins/qmldesigner/components/timelineeditor/timelineicons.h index c03adde2cd4..caa5d7e781c 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/timelineicons.h +++ b/src/plugins/qmldesigner/components/timelineeditor/timelineicons.h @@ -76,9 +76,13 @@ const Utils::Icon PREVIOUS_KEYFRAME({ const Utils::Icon LOCAL_RECORD_KEYFRAMES({ {":/timelineplugin/images/local_record_keyframes.png", Utils::Theme::IconsStopToolBarColor}}); const Utils::Icon ADD_TIMELINE({ + {":/timelineplugin/images/add_timeline.png", Utils::Theme::PanelTextColorDark}}, + Utils::Icon::Tint); +const Utils::Icon ADD_TIMELINE_TOOLBAR({ {":/timelineplugin/images/add_timeline.png", Utils::Theme::IconsBaseColor}}); const Utils::Icon REMOVE_TIMELINE({ - {":/timelineplugin/images/remove_timeline.png", Utils::Theme::IconsBaseColor}}); + {":/timelineplugin/images/remove_timeline.png", Utils::Theme::PanelTextColorDark}}, + Utils::Icon::Tint); // Icons on the toolbars const Utils::Icon ANIMATION({ diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelinewidget.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelinewidget.cpp index 303c761f3c9..82321a1198c 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/timelinewidget.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/timelinewidget.cpp @@ -176,7 +176,7 @@ TimelineWidget::TimelineWidget(TimelineView *view) widgetLayout->addWidget(m_toolbar); widgetLayout->addWidget(m_addButton); - m_addButton->setIcon(TimelineIcons::ADD_TIMELINE.icon()); + m_addButton->setIcon(TimelineIcons::ADD_TIMELINE_TOOLBAR.icon()); m_addButton->setToolTip(tr("Add Timeline")); m_addButton->setFlat(true); m_addButton->setFixedSize(32, 32);