[kcmkwin/kwindesktop] Implement valueFromText in a spinbox
If textFromValue is set, valueFromText must be. A lot of other implemenetations were using parseInt() which fails at reading "3,000" due to the comma. Qt's fromLocaleString handles that but needs any text stripping. This implementation isn't perfect, but really we need to work on a good upstream solution. BUG: 437472
This commit is contained in:
parent
27e043920a
commit
5484b846b3
1 changed files with 1 additions and 0 deletions
|
@ -269,6 +269,7 @@ KCM.ScrollViewKCM {
|
|||
stepSize: 100
|
||||
|
||||
textFromValue: function(value, locale) { return i18n("%1 ms", value)}
|
||||
valueFromText: function(text, locale) {return Number.fromLocaleString(locale, text.split(" ")[0])}
|
||||
|
||||
value: kcm.virtualDesktopsSettings.popupHideDelay
|
||||
|
||||
|
|
Loading…
Reference in a new issue