From 8abe67672ea6d0ed2eeeb289170f3fe879cfe17d Mon Sep 17 00:00:00 2001 From: Ali Kianian Date: Tue, 21 Feb 2023 14:56:59 +0200 Subject: [PATCH] QmlDesigner: Apply Toolbutton style to the toolbar and curveEditor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I65879951025897a638f25ec4d52ce62710d26f54 Reviewed-by: Reviewed-by: Henning Gründl --- .../components/curveeditor/curveeditortoolbar.cpp | 4 ++++ .../components/timelineeditor/timelinetoolbar.cpp | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/components/curveeditor/curveeditortoolbar.cpp b/src/plugins/qmldesigner/components/curveeditor/curveeditortoolbar.cpp index ef795e8fadb..7432a4199bb 100644 --- a/src/plugins/qmldesigner/components/curveeditor/curveeditortoolbar.cpp +++ b/src/plugins/qmldesigner/components/curveeditor/curveeditortoolbar.cpp @@ -8,6 +8,7 @@ #include "coreplugin/actionmanager/actionmanager.h" #include "coreplugin/icontext.h" #include "theme.h" +#include "utils/fileutils.h" #include "utils/id.h" #include @@ -64,6 +65,9 @@ CurveEditorToolBar::CurveEditorToolBar(CurveEditorModel *model, QWidget* parent) setFixedHeight(Theme::toolbarSize()); setContentsMargins(0, 0, 0, 0); + QByteArray sheet = Utils::FileReader::fetchQrc(":/qmldesigner/stylesheet.css"); + setStyleSheet(Theme::replaceCssColors(QString::fromUtf8(sheet))); + QAction *tangentLinearAction = addAction(Theme::iconFromName(Theme::linear_medium), "Linear"); QAction *tangentStepAction = addAction(Theme::iconFromName(Theme::step_medium), "Step"); QAction *tangentSplineAction = addAction(Theme::iconFromName(Theme::bezier_medium), "Spline"); diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp index 76dee371aca..fe2aa378d8c 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp @@ -95,6 +95,9 @@ TimelineToolBar::TimelineToolBar(QWidget *parent) : QToolBar(parent) , m_grp() { + QByteArray sheet = Utils::FileReader::fetchQrc(":/qmldesigner/stylesheet.css"); + setStyleSheet(Theme::replaceCssColors(QString::fromUtf8(sheet))); + setContentsMargins(0, 0, 0, 0); setFixedHeight(Theme::toolbarSize()); createLeftControls(); @@ -275,7 +278,8 @@ void TimelineToolBar::createCenterControls() addSpacing(2); QIcon playbackIcon = TimelineUtils::mergeIcons( - Theme::iconFromName(Theme::Icon::pause), + Theme::iconFromName(Theme::Icon::pause, + Theme::getColor(Theme::Color::DStextSelectedTextColor)), Theme::iconFromName(Theme::Icon::playOutline_medium, Theme::getColor(Theme::Color::IconsRunColor)));