QmlDesigner: Fix timelineView palette for the flat theme

QmlDesigner's timeline view needs a few tweaks to work well with Qt
Creator's default "Flat" theme. The onboarding text, as-well as the
timeline editor view are concerned.

The These tweaks are supposed to have no visual inpact on the "Design"
theme (thus in Qt Design Studio).

Task-number: QTCREATORBUG-24402
Change-Id: I5848b9f4109d4c37a4c7fd904c715a0e1a99fea8
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Alessandro Portale
2020-12-08 11:27:57 +01:00
parent 093111dbc6
commit 070afbbe4a

View File

@@ -238,6 +238,23 @@ TimelineWidget::TimelineWidget(TimelineView *view)
widgetLayout->addLayout(contentLayout);
this->setLayout(widgetLayout);
{
QPalette timelinePalette;
timelinePalette.setColor(QPalette::Text, Utils::creatorTheme()->color(
Utils::Theme::QmlDesigner_FormEditorForegroundColor));
timelinePalette.setColor(QPalette::WindowText, timelinePalette.color(QPalette::Text));
timelinePalette.setColor(QPalette::Window, Utils::creatorTheme()->color(
Utils::Theme::QmlDesigner_BackgroundColorDarkAlternate));
onboardingTopLabel->setPalette(timelinePalette);
onboardingBottomLabel->setPalette(timelinePalette);
setPalette(timelinePalette);
setAutoFillBackground(true);
m_graphicsView->setPalette(timelinePalette);
m_graphicsView->setBackgroundRole(QPalette::Window);
m_statusBar->setPalette(timelinePalette);
}
connectToolbar();
auto setScrollOffset = [this]() { graphicsScene()->setScrollOffset(m_scrollbar->value()); };