From 86cb3851fe8091df96613ce91e5c9f5d39321fdc Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 25 Jul 2023 13:20:26 +0200 Subject: [PATCH] Force left to right reading direction for numeric textfield CURA-10583 --- resources/qml/MachineSettings/NumericTextFieldWithUnit.qml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml b/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml index 64beeb9834..408db66f3a 100644 --- a/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml +++ b/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml @@ -76,6 +76,11 @@ UM.TooltipArea anchors.left: fieldLabel.right anchors.leftMargin: spacing verticalAlignment: Text.AlignVCenter + + // The control is set up for left to right. So we force it to that. If we don't, it will take the OS reading + // direction, which might not be left to right. This will lead to the text overlapping with the unit + horizontalAlignment: TextInput.AlignLeft + selectionColor: UM.Theme.getColor("text_selection") selectedTextColor: UM.Theme.getColor("setting_control_text") padding: 0