mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-20 13:17:51 -06:00
Unbreak LayerView.
CURA-1381
This commit is contained in:
parent
f52f713694
commit
0745b3bbf5
1 changed files with 5 additions and 5 deletions
|
@ -54,9 +54,13 @@ Item
|
||||||
horizontalAlignment: TextInput.AlignRight;
|
horizontalAlignment: TextInput.AlignRight;
|
||||||
onEditingFinished:
|
onEditingFinished:
|
||||||
{
|
{
|
||||||
|
// Ensure that the cursor is at the first position. On some systems the text isn't fully visible
|
||||||
|
// Seems to have to do something with different dpi densities that QML doesn't quite handle.
|
||||||
|
// Another option would be to increase the size even further, but that gives pretty ugly results.
|
||||||
|
cursorPosition = 0;
|
||||||
if(valueLabel.text != '')
|
if(valueLabel.text != '')
|
||||||
{
|
{
|
||||||
slider.value = valueLabel.text - 1
|
slider.value = valueLabel.text - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
validator: IntValidator { bottom: 1; top: slider.maximumValue + 1; }
|
validator: IntValidator { bottom: 1; top: slider.maximumValue + 1; }
|
||||||
|
@ -66,10 +70,6 @@ Item
|
||||||
anchors.verticalCenter: parent.verticalCenter;
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
|
|
||||||
width: Math.max(UM.Theme.getSize("line").width * maxValue.length + 2, 20);
|
width: Math.max(UM.Theme.getSize("line").width * maxValue.length + 2, 20);
|
||||||
// Ensure that the cursor is at the first position. On some systems the text isnt fully visible
|
|
||||||
// Seems to have to do something with different dpi densities that QML doesn't quite handle.
|
|
||||||
// Another option would be to increase the size even further, but that gives pretty ugly results.
|
|
||||||
onEditingFinished: cursorPosition = 0
|
|
||||||
style: TextFieldStyle
|
style: TextFieldStyle
|
||||||
{
|
{
|
||||||
textColor: UM.Theme.getColor("setting_control_text");
|
textColor: UM.Theme.getColor("setting_control_text");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue