From 070afbbe4a9de7ac4e8faa8ff6314bd069ccf171 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Tue, 8 Dec 2020 11:27:57 +0100 Subject: [PATCH] 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 Reviewed-by: Knud Dollereder Reviewed-by: Alessandro Portale --- .../timelineeditor/timelinewidget.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelinewidget.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelinewidget.cpp index 9e125bceb4d..bfa56b89c7f 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/timelinewidget.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/timelinewidget.cpp @@ -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()); };