diff --git a/declarativeimports/plasmacomponents/qml/Slider.qml b/declarativeimports/plasmacomponents/qml/Slider.qml index 1931abf2b..2cbd5a210 100644 --- a/declarativeimports/plasmacomponents/qml/Slider.qml +++ b/declarativeimports/plasmacomponents/qml/Slider.qml @@ -113,17 +113,33 @@ Item { positionAtMaximum: contents.width - handle.width / 2 } - PlasmaCore.SvgItem { + PlasmaCore.Svg { + id: grooveSvg + imagePath: "widgets/frame" + } + PlasmaCore.FrameSvgItem { 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 { left: parent.left right: parent.right verticalCenter: parent.verticalCenter } - height: 3 - svg: PlasmaCore.Svg { imagePath: "widgets/slider" } - elementId: "horizontal-slider-line" + } + PlasmaCore.FrameSvgItem { + 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 { diff --git a/declarativeimports/plasmacomponents/qml/Switch.qml b/declarativeimports/plasmacomponents/qml/Switch.qml index f7e7f290d..55087c872 100644 --- a/declarativeimports/plasmacomponents/qml/Switch.qml +++ b/declarativeimports/plasmacomponents/qml/Switch.qml @@ -35,6 +35,18 @@ DualStateButton { 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 { imagePath: "widgets/button" prefix: "shadow"