|
@@ -13,23 +13,23 @@ Item
|
|
|
{
|
|
|
id: sliderRoot
|
|
|
|
|
|
- // handle properties
|
|
|
- property real handleSize: 10
|
|
|
+ // Handle properties
|
|
|
+ property real handleSize: UM.Theme.getSize("slider_handle").width
|
|
|
property real handleRadius: handleSize / 2
|
|
|
property real minimumRangeHandleSize: handleSize / 2
|
|
|
- property color upperHandleColor: "black"
|
|
|
- property color lowerHandleColor: "black"
|
|
|
- property color rangeHandleColor: "black"
|
|
|
- property color handleActiveColor: "white"
|
|
|
- property real handleLabelWidth: width
|
|
|
+ property color upperHandleColor: UM.Theme.getColor("slider_handle")
|
|
|
+ property color lowerHandleColor: UM.Theme.getColor("slider_handle")
|
|
|
+ property color rangeHandleColor: UM.Theme.getColor("slider_groove_fill")
|
|
|
+ property color handleActiveColor: UM.Theme.getColor("slider_handle_active")
|
|
|
+ property real handleLabelWidth: UM.Theme.getSize("slider_layerview_background").width
|
|
|
property var activeHandle: upperHandle
|
|
|
|
|
|
- // track properties
|
|
|
- property real trackThickness: 4 // width of the slider track
|
|
|
+ // Track properties
|
|
|
+ property real trackThickness: UM.Theme.getSize("slider_groove").width // width of the slider track
|
|
|
property real trackRadius: trackThickness / 2
|
|
|
- property color trackColor: "white"
|
|
|
- property real trackBorderWidth: 1 // width of the slider track border
|
|
|
- property color trackBorderColor: "black"
|
|
|
+ property color trackColor: UM.Theme.getColor("slider_groove")
|
|
|
+ property real trackBorderWidth: 1
|
|
|
+ property color trackBorderColor: UM.Theme.getColor("slider_groove_border")
|
|
|
|
|
|
// value properties
|
|
|
property real maximumValue: 100
|
|
@@ -80,7 +80,7 @@ Item
|
|
|
return Math.min(Math.max(value, sliderRoot.minimumValue), sliderRoot.maximumValue)
|
|
|
}
|
|
|
|
|
|
- // slider track
|
|
|
+ // Slider track
|
|
|
Rectangle
|
|
|
{
|
|
|
id: track
|
|
@@ -106,7 +106,7 @@ Item
|
|
|
anchors.horizontalCenter: sliderRoot.horizontalCenter
|
|
|
visible: sliderRoot.layersVisible
|
|
|
|
|
|
- // set the new value when dragging
|
|
|
+ // Set the new value when dragging
|
|
|
function onHandleDragged()
|
|
|
{
|
|
|
sliderRoot.manuallyChanged = true
|
|
@@ -169,7 +169,7 @@ Item
|
|
|
height: sliderRoot.handleSize + UM.Theme.getSize("default_margin").height
|
|
|
x: parent.x + parent.width + UM.Theme.getSize("default_margin").width
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
- target: Qt.point(sliderRoot.width, y + height / 2)
|
|
|
+ target: Qt.point(sliderRoot.width + width, y + height / 2)
|
|
|
visible: sliderRoot.activeHandle == parent
|
|
|
|
|
|
// custom properties
|
|
@@ -275,7 +275,7 @@ Item
|
|
|
id: upperHandleLabel
|
|
|
|
|
|
height: sliderRoot.handleSize + UM.Theme.getSize("default_margin").height
|
|
|
- x: parent.x + parent.width + UM.Theme.getSize("default_margin").width
|
|
|
+ x: parent.x - parent.width - width
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
target: Qt.point(sliderRoot.width, y + height / 2)
|
|
|
visible: sliderRoot.activeHandle == parent
|
|
@@ -385,9 +385,9 @@ Item
|
|
|
id: lowerHandleLabel
|
|
|
|
|
|
height: sliderRoot.handleSize + UM.Theme.getSize("default_margin").height
|
|
|
- x: parent.x + parent.width + UM.Theme.getSize("default_margin").width
|
|
|
+ x: parent.x - parent.width - width
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
- target: Qt.point(sliderRoot.width, y + height / 2)
|
|
|
+ target: Qt.point(sliderRoot.width + width, y + height / 2)
|
|
|
visible: sliderRoot.activeHandle == parent
|
|
|
|
|
|
// custom properties
|