mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 09:17:50 -06:00
Enlarge the zone where you can use scrolling to look trough the layer mode.
Also make it more visible fixes #118
This commit is contained in:
parent
ab07b0205f
commit
ae89ef37c0
4 changed files with 44 additions and 6 deletions
|
@ -15,10 +15,11 @@ Item
|
|||
|
||||
Slider
|
||||
{
|
||||
id: slider
|
||||
width: 10
|
||||
height: 250
|
||||
anchors.right : parent.right
|
||||
anchors.rightMargin: UM.Theme.sizes.default_margin.width * 2
|
||||
anchors.rightMargin: UM.Theme.sizes.slider_layerview_margin.width
|
||||
orientation: Qt.Vertical
|
||||
minimumValue: 0;
|
||||
maximumValue: UM.LayerView.numLayers;
|
||||
|
@ -27,6 +28,31 @@ Item
|
|||
value: UM.LayerView.currentLayer
|
||||
onValueChanged: UM.LayerView.setCurrentLayer(value)
|
||||
|
||||
style: UM.LayerView.getLayerActivity ? UM.Theme.styles.layerViewSlider : UM.Theme.styles.slider
|
||||
style: UM.Theme.styles.layerViewSlider
|
||||
}
|
||||
Rectangle {
|
||||
anchors.right: parent.right
|
||||
y: -UM.Theme.sizes.slider_layerview_background_extension.height
|
||||
z: slider.z - 1
|
||||
width: UM.Theme.sizes.button.width
|
||||
height: UM.Theme.sizes.slider_layerview_background_extension.height
|
||||
color: UM.Theme.colors.slider_text_background
|
||||
}
|
||||
UM.AngledCornerRectangle {
|
||||
anchors.right : parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
z: slider.z - 1
|
||||
cornerSize: UM.Theme.sizes.default_margin.width;
|
||||
width: UM.Theme.sizes.slider_layerview_background.width
|
||||
height: slider.height + UM.Theme.sizes.default_margin.height * 2
|
||||
color: UM.Theme.colors.slider_text_background
|
||||
MouseArea {
|
||||
id: sliderMouseArea
|
||||
property double manualStepSize: slider.maximumValue / 11
|
||||
anchors.fill: parent
|
||||
onWheel: {
|
||||
slider.value = wheel.angleDelta.y < 0 ? slider.value - sliderMouseArea.manualStepSize : slider.value + sliderMouseArea.manualStepSize
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue