From 15e09efeefdba94a0e4e77cbfea1aaf571248991 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 15 Dec 2015 13:15:06 +0100 Subject: [PATCH] Fix layer slider label size and behavior --- resources/themes/cura/styles.qml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index b64ba24874..acf9067241 100644 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -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;