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
a91558655c
commit
31cfc8833a
|
@ -15,8 +15,10 @@ Slider {
|
||||||
leftPadding: 0
|
leftPadding: 0
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
implicitHeight: 4
|
id: bgRect
|
||||||
implicitWidth: 100
|
implicitWidth: 100
|
||||||
|
implicitHeight: 4
|
||||||
|
height: implicitHeight
|
||||||
color: {
|
color: {
|
||||||
if (statusSlider.value === statusSlider.to) {
|
if (statusSlider.value === statusSlider.to) {
|
||||||
return Theme.palette.primaryColor1
|
return Theme.palette.primaryColor1
|
||||||
|
@ -40,7 +42,7 @@ Slider {
|
||||||
|
|
||||||
handle: Rectangle {
|
handle: Rectangle {
|
||||||
x: statusSlider.leftPadding + statusSlider.visualPosition * (statusSlider.availableWidth - width / 2)
|
x: statusSlider.leftPadding + statusSlider.visualPosition * (statusSlider.availableWidth - width / 2)
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: bgRect.verticalCenter
|
||||||
color: Theme.palette.white
|
color: Theme.palette.white
|
||||||
implicitWidth: 28
|
implicitWidth: 28
|
||||||
implicitHeight: 28
|
implicitHeight: 28
|
||||||
|
|
Loading…
Reference in New Issue