From e010d4f945c62967cf5ebee9eedd64b74970b6e5 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 10 Jul 2020 16:44:55 +0200 Subject: [PATCH] Only enable clipping for list text fields Because clipping is expensive! --- resources/qml/Settings/SettingTextField.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index c0c7772104..d57bbaad8a 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -153,7 +153,7 @@ SettingItem selectByMouse: true maximumLength: (definition.type == "str" || definition.type == "[int]") ? -1 : 10 - clip: true; //Hide any text that exceeds the width of the text box. + clip: definition.type == "[int]" // Only clip for the list validator: RegExpValidator { regExp: (definition.type == "[int]") ? /^\[?(\s*-?[0-9]{0,9}\s*,)*(\s*-?[0-9]{0,9})\s*\]?$/ : (definition.type == "int") ? /^-?[0-9]{0,10}$/ : (definition.type == "float") ? /^-?[0-9]{0,9}[.,]?[0-9]{0,3}$/ : /^.*$/ } // definition.type property from parent loader used to disallow fractional number entry