|
@@ -272,6 +272,7 @@ QtObject {
|
|
|
}
|
|
|
|
|
|
handle: UM.AngledCornerRectangle {
|
|
|
+ id: scrollViewHandle
|
|
|
implicitWidth: UM.Theme.sizes.scrollbar.width;
|
|
|
|
|
|
cornerSize: UM.Theme.sizes.scrollbar.width;
|
|
@@ -367,6 +368,72 @@ QtObject {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ property Component layerViewSlider: Component {
|
|
|
+ SliderStyle {
|
|
|
+ groove: Rectangle {
|
|
|
+ id: layerSliderGroove
|
|
|
+ implicitWidth: control.width;
|
|
|
+ implicitHeight: UM.Theme.sizes.slider_groove.height;
|
|
|
+
|
|
|
+ color: UM.Theme.colors.slider_groove;
|
|
|
+ border.width: 1;
|
|
|
+ border.color: UM.Theme.colors.slider_groove_border;
|
|
|
+ Rectangle {
|
|
|
+ anchors {
|
|
|
+ left: parent.left;
|
|
|
+ top: parent.top;
|
|
|
+ bottom: parent.bottom;
|
|
|
+ }
|
|
|
+ color: UM.Theme.colors.slider_groove_fill;
|
|
|
+ width: (control.value / (control.maximumValue - control.minimumValue)) * parent.width;
|
|
|
+ }
|
|
|
+ Label {
|
|
|
+ id: maxValueLabel
|
|
|
+ text: control.maximumValue + 1
|
|
|
+ transformOrigin: Item.BottomLeft
|
|
|
+ rotation: 90
|
|
|
+ x: parent.x + parent.width - maxValueLabel.height
|
|
|
+ y: parent.y
|
|
|
+ }
|
|
|
+ Label {
|
|
|
+ id: minValueLabel
|
|
|
+ text: '1'
|
|
|
+ transformOrigin: Item.BottomLeft
|
|
|
+ rotation: 90
|
|
|
+ x: parent.x
|
|
|
+ y: parent.y
|
|
|
+ }
|
|
|
+ }
|
|
|
+ handle: Rectangle {
|
|
|
+ id: layerSliderControl
|
|
|
+ width: UM.Theme.sizes.slider_handle.width;
|
|
|
+ height: UM.Theme.sizes.slider_handle.height;
|
|
|
+ color: control.hovered ? UM.Theme.colors.slider_handle_hover : UM.Theme.colors.slider_handle;
|
|
|
+ Behavior on color { ColorAnimation { duration: 50; } }
|
|
|
+ Label {
|
|
|
+ id: valueLabel
|
|
|
+ text: control.value + 1
|
|
|
+ anchors.bottom: layerSliderControl.bottom
|
|
|
+ anchors.right: layerSliderControl.left
|
|
|
+ anchors.bottomMargin: parent.width + UM.Theme.sizes.default_margin.width
|
|
|
+ transformOrigin: Item.BottomRight
|
|
|
+ rotation: 90
|
|
|
+ Rectangle {
|
|
|
+ width: (parent.width + UM.Theme.sizes.tooltip_margins.width) < 35 ? 35 : parent.width + UM.Theme.sizes.tooltip_margins.width
|
|
|
+ height: parent.height + UM.Theme.sizes.tooltip_margins.height
|
|
|
+ anchors.verticalCenter: parent.verticalCenter
|
|
|
+ anchors.horizontalCenter: parent.horizontalCenter
|
|
|
+ z: parent.z - 1
|
|
|
+ color: UM.Theme.colors.slider_text_background
|
|
|
+ border.width: 1
|
|
|
+ border.color: UM.Theme.colors.slider_groove_fill;
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
property Component text_field: Component {
|
|
|
TextFieldStyle {
|
|
|
textColor: UM.Theme.colors.setting_control_text;
|