From 3c48aec7aca89b6a2c7af729792a6e082925256e Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 6 Sep 2018 14:51:07 +0200 Subject: [PATCH] don't corrupt the active part simplify the size hints reviewed-by: kbroulik --- .../plasmacomponents3/Slider.qml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/declarativeimports/plasmacomponents3/Slider.qml b/src/declarativeimports/plasmacomponents3/Slider.qml index 348a84a1f..1dd083a23 100644 --- a/src/declarativeimports/plasmacomponents3/Slider.qml +++ b/src/declarativeimports/plasmacomponents3/Slider.qml @@ -25,14 +25,10 @@ import "private" as Private T.Slider { id: control - implicitWidth: Math.max(background ? background.implicitWidth : 0, - Math.max(handle ? handle.implicitWidth : 0, - handle ? handle.implicitWidth : 0) + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, - Math.max(handle ? handle.implicitHeight : 0, - handle ? handle.implicitHeight : 0) + topPadding + bottomPadding) + implicitWidth: control.orientation === Qt.Horizontal ? units.gridUnit * 12 : units.gridUnit * 1.6 + implicitHeight: control.orientation === Qt.Horizontal ? units.gridUnit * 1.6 : units.gridUnit * 12 + - padding: units.gridUnit snapMode: T.Slider.SnapOnRelease PlasmaCore.Svg { @@ -81,8 +77,8 @@ T.Slider { prefix: "groove-highlight" x: parent.horizontal ? 0 : (parent.width - width) / 2 y: parent.horizontal ? (parent.height - height) / 2 : control.visualPosition * parent.height - width: parent.horizontal ? control.position * parent.width : parent.width - height: parent.horizontal ? parent.height : control.position * parent.height + width: Math.max(margins.left + margins.right, parent.horizontal ? control.position * parent.width : parent.width) + height: Math.max(margins.top + margins.bottom, parent.horizontal ? parent.height : control.position * parent.height) } Repeater {