mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-29 15:57:03 +00:00
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:
parent
d1be7973c9
commit
77e210fa87
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user