mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 09:59:00 +08:00
Move upper layer slider handle label to the top
CURA-6854
This commit is contained in:
parent
2beeca0687
commit
5ebdae9f1a
@ -275,10 +275,12 @@ Item
|
||||
{
|
||||
id: upperHandleLabel
|
||||
|
||||
height: sliderRoot.handleSize + UM.Theme.getSize("default_margin").height
|
||||
x: parent.x - parent.width - width
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
target: Qt.point(sliderRoot.width, y + height / 2)
|
||||
height: sliderRoot.handleSize + UM.Theme.getSize("small_margin").height
|
||||
//x: parent.x
|
||||
anchors.bottom: parent.top
|
||||
anchors.bottomMargin: UM.Theme.getSize("narrow_margin").height
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
target: Qt.point(parent.width / 2, parent.top)
|
||||
visible: sliderRoot.activeHandle == parent
|
||||
|
||||
// custom properties
|
||||
@ -397,4 +399,4 @@ Item
|
||||
setValue: lowerHandle.setValueManually // connect callback functions
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,9 +20,9 @@ UM.PointingRectangle {
|
||||
property int startFrom: 1
|
||||
|
||||
target: Qt.point(parent.width, y + height / 2)
|
||||
arrowSize: UM.Theme.getSize("default_arrow").width
|
||||
arrowSize: UM.Theme.getSize("button_tooltip_arrow").height
|
||||
height: parent.height
|
||||
width: valueLabel.width + UM.Theme.getSize("default_margin").width
|
||||
width: valueLabel.width
|
||||
visible: false
|
||||
|
||||
color: UM.Theme.getColor("tool_panel_background")
|
||||
@ -48,9 +48,9 @@ UM.PointingRectangle {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
|
||||
width: ((maximumValue + 1).toString().length + 1) * 10 * screenScaleFactor
|
||||
width: ((maximumValue + 1).toString().length + 1) * 8 * screenScaleFactor
|
||||
text: sliderLabelRoot.value + startFrom // the current handle value, add 1 because layers is an array
|
||||
horizontalAlignment: TextInput.AlignRight
|
||||
horizontalAlignment: TextInput.AlignHCenter
|
||||
|
||||
// key bindings, work when label is currenctly focused (active handle in LayerSlider)
|
||||
Keys.onUpPressed: sliderLabelRoot.setValue(sliderLabelRoot.value + ((event.modifiers & Qt.ShiftModifier) ? 10 : 1))
|
||||
@ -58,7 +58,7 @@ UM.PointingRectangle {
|
||||
|
||||
style: TextFieldStyle {
|
||||
textColor: UM.Theme.getColor("setting_control_text")
|
||||
font: UM.Theme.getFont("default")
|
||||
font: UM.Theme.getFont("small")
|
||||
background: Item { }
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user