Changeset View
Changeset View
Standalone View
Standalone View
src/declarativeimports/plasmacomponents3/Slider.qml
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Line(s) | 67 | background: PlasmaCore.FrameSvgItem { | |||
---|---|---|---|---|---|
68 | imagePath: "widgets/slider" | 68 | imagePath: "widgets/slider" | ||
69 | prefix: "groove" | 69 | prefix: "groove" | ||
70 | readonly property bool horizontal: control.orientation === Qt.Horizontal | 70 | readonly property bool horizontal: control.orientation === Qt.Horizontal | ||
71 | implicitWidth: horizontal ? units.gridUnit * 8 : margins.left + margins.right | 71 | implicitWidth: horizontal ? units.gridUnit * 8 : margins.left + margins.right | ||
72 | implicitHeight: horizontal ? margins.top + margins.bottom : units.gridUnit * 8 | 72 | implicitHeight: horizontal ? margins.top + margins.bottom : units.gridUnit * 8 | ||
73 | width: horizontal ? control.availableWidth : implicitWidth | 73 | width: horizontal ? control.availableWidth : implicitWidth | ||
74 | height: horizontal ? implicitHeight : control.availableHeight | 74 | height: horizontal ? implicitHeight : control.availableHeight | ||
75 | anchors.centerIn: parent | 75 | anchors.centerIn: parent | ||
76 | scale: horizontal && control.mirrored ? -1 : 1 | ||||
76 | 77 | | |||
77 | PlasmaCore.FrameSvgItem { | 78 | PlasmaCore.FrameSvgItem { | ||
78 | imagePath: "widgets/slider" | 79 | imagePath: "widgets/slider" | ||
79 | prefix: "groove-highlight" | 80 | prefix: "groove-highlight" | ||
80 | x: parent.horizontal ? 0 : (parent.width - width) / 2 | 81 | x: parent.horizontal ? 0 : (parent.width - width) / 2 | ||
81 | y: parent.horizontal ? (parent.height - height) / 2 : control.visualPosition * parent.height | 82 | y: parent.horizontal ? (parent.height - height) / 2 : control.visualPosition * parent.height | ||
82 | width: parent.horizontal ? control.position * parent.width : parent.width | 83 | width: parent.horizontal ? control.position * parent.width : parent.width | ||
83 | height: parent.horizontal ? parent.height : control.position * parent.height | 84 | height: parent.horizontal ? parent.height : control.position * parent.height | ||
Show All 17 Lines |