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
This commit is contained in:
Alexandra Betouni 2021-11-02 21:42:48 +02:00 committed by Pascal Precht
parent a91558655c
commit 31cfc8833a
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
1 changed files with 4 additions and 2 deletions

View File

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