Skip to content

Commit

Permalink
Parse popup size spinbox input
Browse files Browse the repository at this point in the history
The values need to be parsed back from display text otherwise the value
becomes invalid on text entry.
  • Loading branch information
ilarth committed Jan 7, 2023
1 parent c767b29 commit bb59ef9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cqcb.plasma.webslice/contents/ui/ConfigGeneral.qml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ Item {
textFromValue: function(value, locale) {
return i18nc('Abbreviation for pixels', '%1 px', value);
}
valueFromText: function(text) {
return parseInt(text.split(' px')[0], 10)
}
Layout.columnSpan: 1
}

Expand All @@ -189,6 +192,9 @@ Item {
textFromValue: function(value, locale) {
return i18nc('Abbreviation for pixels', '%1 px', value);
}
valueFromText: function(text) {
return parseInt(text.split(' px')[0], 10)
}
Layout.columnSpan: 1
}

Expand Down

0 comments on commit bb59ef9

Please sign in to comment.