From 1b82f7c1646ae44e4d5587a5582ed249b1f818af Mon Sep 17 00:00:00 2001 From: Ali Kianian Date: Mon, 20 Feb 2023 21:47:13 +0200 Subject: [PATCH] QmlDesigner: Tweak the curve editor toolbar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Less space is applied between the items * Colors are modified Task-number: QDS-9079 Change-Id: I5c9dbdf4ecdb518d509532a8e49c5eda098d760a Reviewed-by: Henning Gründl --- src/plugins/coreplugin/manhattanstyle.cpp | 7 +++++-- .../components/curveeditor/curveeditortoolbar.h | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp index e1eb7559ac4..f55a1bf9b89 100644 --- a/src/plugins/coreplugin/manhattanstyle.cpp +++ b/src/plugins/coreplugin/manhattanstyle.cpp @@ -1001,7 +1001,10 @@ void ManhattanStyle::drawPrimitiveForPanelWidget(PrimitiveElement element, painter->save(); if (!enabled) painter->setOpacity(0.75); - painter->fillRect(backgroundRect, option->palette.base()); + QBrush baseBrush = option->palette.base(); + if (widget && qobject_cast(widget->parentWidget())) + baseBrush = creatorTheme()->color(Theme::DScontrolBackgroundDisabled); + painter->fillRect(backgroundRect, baseBrush); painter->restore(); } else { backgroundRect.adjust(1, 1, -1, -1); @@ -1786,7 +1789,7 @@ void ManhattanStyle::drawComplexControl(ComplexControl control, const QStyleOpti } break; case CC_Slider: - if (const QStyleOptionSlider *slider = qstyleoption_cast(option)) { + if (const auto *slider = qstyleoption_cast(option)) { QRect groove = proxy()->subControlRect(CC_Slider, option, SC_SliderGroove, widget); QRect handle = proxy()->subControlRect(CC_Slider, option, SC_SliderHandle, widget); diff --git a/src/plugins/qmldesigner/components/curveeditor/curveeditortoolbar.h b/src/plugins/qmldesigner/components/curveeditor/curveeditortoolbar.h index 012aab20ec8..ac7a3961e50 100644 --- a/src/plugins/qmldesigner/components/curveeditor/curveeditortoolbar.h +++ b/src/plugins/qmldesigner/components/curveeditor/curveeditortoolbar.h @@ -58,8 +58,8 @@ public: private: void addSpacer(); - void addSpace(int spaceSize = 40); - void addSpace(QLayout *layout, int spaceSize = 40); + void addSpace(int spaceSize = 32); + void addSpace(QLayout *layout, int spaceSize = 32); ValidatableSpinBox *m_startSpin; ValidatableSpinBox *m_endSpin;