use an active look for the on switch and the progress part of the slider
This commit is contained in:
parent
93a8858617
commit
2ae8e31d77
@ -113,17 +113,33 @@ Item {
|
|||||||
positionAtMaximum: contents.width - handle.width / 2
|
positionAtMaximum: contents.width - handle.width / 2
|
||||||
}
|
}
|
||||||
|
|
||||||
PlasmaCore.SvgItem {
|
PlasmaCore.Svg {
|
||||||
|
id: grooveSvg
|
||||||
|
imagePath: "widgets/frame"
|
||||||
|
}
|
||||||
|
PlasmaCore.FrameSvgItem {
|
||||||
id: groove
|
id: groove
|
||||||
|
imagePath: "widgets/frame"
|
||||||
|
prefix: "sunken"
|
||||||
|
//FIXME: frameSvg should have a minimumSize attribute, could be added to kdelibs 4.7(maybe just the qml binding is enough)?
|
||||||
|
height: grooveSvg.elementSize("sunken-topleft").height + grooveSvg.elementSize("sunken-bottomleft").height
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
height: 3
|
}
|
||||||
svg: PlasmaCore.Svg { imagePath: "widgets/slider" }
|
PlasmaCore.FrameSvgItem {
|
||||||
elementId: "horizontal-slider-line"
|
id: highlight
|
||||||
|
imagePath: "widgets/frame"
|
||||||
|
prefix: "sunken-active"
|
||||||
|
height: groove.height
|
||||||
|
width: range.position
|
||||||
|
anchors {
|
||||||
|
left: parent.left
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
visible: range.position > 0 && slider.enabled
|
||||||
}
|
}
|
||||||
|
|
||||||
PlasmaCore.SvgItem {
|
PlasmaCore.SvgItem {
|
||||||
|
@ -35,6 +35,18 @@ DualStateButton {
|
|||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PlasmaCore.FrameSvgItem {
|
||||||
|
id: highlight
|
||||||
|
imagePath: "widgets/frame"
|
||||||
|
prefix: "sunken-active"
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
opacity: checked ? 1 : 0
|
||||||
|
Behavior on opacity {
|
||||||
|
PropertyAnimation { duration: 100 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
PlasmaCore.FrameSvgItem {
|
PlasmaCore.FrameSvgItem {
|
||||||
imagePath: "widgets/button"
|
imagePath: "widgets/button"
|
||||||
prefix: "shadow"
|
prefix: "shadow"
|
||||||
|
Loading…
Reference in New Issue
Block a user