mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-08 20:09:02 +08:00
Fix layer slider label size and behavior
This commit is contained in:
parent
ed0fea125c
commit
15e09efeef
@ -493,7 +493,7 @@ QtObject {
|
||||
radius: width/2;
|
||||
|
||||
color: UM.Theme.colors.slider_groove;
|
||||
border.width: UM.Theme.sizes.default_lining;
|
||||
border.width: UM.Theme.sizes.default_lining.width;
|
||||
border.color: UM.Theme.colors.slider_groove_border;
|
||||
Rectangle {
|
||||
anchors {
|
||||
@ -515,26 +515,24 @@ QtObject {
|
||||
TextField {
|
||||
id: valueLabel
|
||||
property string maxValue: control.maximumValue + 1
|
||||
placeholderText: control.value + 1
|
||||
text: control.value + 1
|
||||
horizontalAlignment: TextInput.AlignHCenter
|
||||
onEditingFinished: {
|
||||
if (valueLabel.text != ''){
|
||||
control.value = valueLabel.text - 1
|
||||
valueLabel.text = ''
|
||||
valueLabel.focus = false
|
||||
}
|
||||
|
||||
}
|
||||
validator: IntValidator {bottom: 1; top: control.maximumValue + 1;}
|
||||
visible: UM.LayerView.getLayerActivity && Printer.getPlatformActivity ? true : false
|
||||
anchors.top: layerSliderControl.bottom
|
||||
anchors.topMargin: UM.Theme.sizes.default_margin.width
|
||||
anchors.topMargin: width/2 - UM.Theme.sizes.default_margin.width/2
|
||||
anchors.horizontalCenter: layerSliderControl.horizontalCenter
|
||||
rotation: 90
|
||||
style: TextFieldStyle{
|
||||
textColor: UM.Theme.colors.setting_control_text;
|
||||
font: UM.Theme.fonts.default;
|
||||
background: Rectangle {
|
||||
implicitWidth: control.maxValue.length * valueLabel.font.pixelSize
|
||||
implicitWidth: control.maxValue.length * valueLabel.font.pixelSize + UM.Theme.sizes.default_margin.width
|
||||
implicitHeight: UM.Theme.sizes.slider_handle.height + UM.Theme.sizes.default_margin.width
|
||||
border.width: UM.Theme.sizes.default_lining.width;
|
||||
border.color: UM.Theme.colors.slider_groove_border;
|
||||
|
Loading…
x
Reference in New Issue
Block a user