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 <thomas.hartmann@qt.io>
This commit is contained in:
Alessandro Portale
2019-10-01 00:20:07 +02:00
parent dea46dd04e
commit 060d47f317
2 changed files with 6 additions and 2 deletions

View File

@@ -76,9 +76,13 @@ const Utils::Icon PREVIOUS_KEYFRAME({
const Utils::Icon LOCAL_RECORD_KEYFRAMES({ const Utils::Icon LOCAL_RECORD_KEYFRAMES({
{":/timelineplugin/images/local_record_keyframes.png", Utils::Theme::IconsStopToolBarColor}}); {":/timelineplugin/images/local_record_keyframes.png", Utils::Theme::IconsStopToolBarColor}});
const Utils::Icon ADD_TIMELINE({ 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}}); {":/timelineplugin/images/add_timeline.png", Utils::Theme::IconsBaseColor}});
const Utils::Icon REMOVE_TIMELINE({ 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 // Icons on the toolbars
const Utils::Icon ANIMATION({ const Utils::Icon ANIMATION({

View File

@@ -176,7 +176,7 @@ TimelineWidget::TimelineWidget(TimelineView *view)
widgetLayout->addWidget(m_toolbar); widgetLayout->addWidget(m_toolbar);
widgetLayout->addWidget(m_addButton); 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->setToolTip(tr("Add Timeline"));
m_addButton->setFlat(true); m_addButton->setFlat(true);
m_addButton->setFixedSize(32, 32); m_addButton->setFixedSize(32, 32);