From 31cfc8833ab3a7ca231826033e98764a7a160ee9 Mon Sep 17 00:00:00 2001 From: Alexandra Betouni <31625338+alexandraB99@users.noreply.github.com> Date: Tue, 2 Nov 2021 21:42:48 +0200 Subject: [PATCH] fix(StatusSlider): slider background and handle should not depend on root's height Made slider background and handle to not depend to root's height so that it covers cases where a legend is needed thus all should be clickable for better user experience. Relates to status-im/status-desktop#3984 --- src/StatusQ/Controls/StatusSlider.qml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/StatusQ/Controls/StatusSlider.qml b/src/StatusQ/Controls/StatusSlider.qml index 6915d447..340c6894 100644 --- a/src/StatusQ/Controls/StatusSlider.qml +++ b/src/StatusQ/Controls/StatusSlider.qml @@ -15,8 +15,10 @@ Slider { leftPadding: 0 background: Rectangle { - implicitHeight: 4 + id: bgRect implicitWidth: 100 + implicitHeight: 4 + height: implicitHeight color: { if (statusSlider.value === statusSlider.to) { return Theme.palette.primaryColor1 @@ -40,7 +42,7 @@ Slider { handle: Rectangle { x: statusSlider.leftPadding + statusSlider.visualPosition * (statusSlider.availableWidth - width / 2) - anchors.verticalCenter: parent.verticalCenter + anchors.verticalCenter: bgRect.verticalCenter color: Theme.palette.white implicitWidth: 28 implicitHeight: 28