QmlDesigner: Tweak the curve editor toolbar

* Less space is applied between the items
* Colors are modified

Task-number: QDS-9079
Change-Id: I5c9dbdf4ecdb518d509532a8e49c5eda098d760a
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
This commit is contained in:
Ali Kianian
2023-02-20 21:47:13 +02:00
parent a98c6583be
commit 1b82f7c164
2 changed files with 7 additions and 4 deletions

View File

@@ -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<const QSpinBox *>(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<const QStyleOptionSlider *>(option)) {
if (const auto *slider = qstyleoption_cast<const QStyleOptionSlider *>(option)) {
QRect groove = proxy()->subControlRect(CC_Slider, option, SC_SliderGroove, widget);
QRect handle = proxy()->subControlRect(CC_Slider, option, SC_SliderHandle, widget);

View File

@@ -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;