From 77e210fa876b656b5e865a6f2e858527de96bee5 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 --- ui/StatusQ/src/StatusQ/Controls/StatusSlider.qml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/StatusQ/src/StatusQ/Controls/StatusSlider.qml b/ui/StatusQ/src/StatusQ/Controls/StatusSlider.qml index 6915d4471e..340c6894f7 100644 --- a/ui/StatusQ/src/StatusQ/Controls/StatusSlider.qml +++ b/ui/StatusQ/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