Created attachment 182379 [details] Showcase of the bug. SUMMARY Under System Settings -> Display Configuration, both "Scale" and "Brightness" allow me to enter characters, without a max length limit. STEPS TO REPRODUCE 1. Open System Settings -> Display Configuration. 2. Type in either "Scale" or "Brightness" characters until it's off screen. OBSERVED RESULT I can type characters, and there's no limit preventing it from going off screen. EXPECTED RESULT The box should not allow for characters, and there should be a limit. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Fedora Linux 42 KDE Plasma Version: 6.4.0 KDE Frameworks Version: 6.15.0 Qt Version: 6.9.1 ADDITIONAL INFORMATION - I wrote about this bug under Bug 505763, but I think it's more fitting to open its own bug report.
Hah! I'll fix it.
Unfortunately we can't limit the entry of letters due to the QtQuickControls SpinBox item being fairly limited in what you can do with it. But we can set a size limit for it.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kscreen/-/merge_requests/403
(In reply to Nate Graham from comment #2) > Unfortunately we can't limit the entry of letters due to the QtQuickControls > SpinBox item being fairly limited in what you can do with it. But we can set > a size limit for it. Is there any reason why some of the other settings don't have this problem? And there seem to be quite a few other settings where there is no size limit. Mouse -> Pointer speed (No letters allowed, no max length). Touchpad -> Pointer speed (No letters allowed, no max length). Screen Edges -> Trigger quarter tilting in (No letters allowed, can't type more than 2 numbers). Screen Edges -> Activation Delay (No letters allowed, can't type more than 2 numbers). Screen Edges -> Reactivation Delay (No letters allowed, can't type more than 2 numbers). Keyboard -> Keyboard -> Key Repeat (Can type letters, no max length). Keyboard -> Keyboard -> Rate (Can type letters, no max length if combined with letters). Multimedia -> Audio CDs -> MP3 Encoder -> Filter Settings [all] (No letters allowed, max length has the correct value for every Hz). Multimedia -> Audio CDs -> Opus Encoder -> Opus Complexity Setting (No letters allowed, can't type more than 2 numbers). Multimedia -> Audio CDs -> Flac Encoder -> Flac Compression Level (No letters allowed, can't type more than 2 numbers). Accessibility -> System Bell -> Visual Bell Duration (Can type letters, no max length). Accessibility -> Keyboard Filters -> Bounce/Slow keys Delay (Can type letters, no max length). Accessibility -> Mouse Navigation -> Acceleration Delay/Repeat Interval/Acceleration Time (Can type letters, no max length for letters only). !!these two don't get reset to default value in the UI, need to restart System Settings!! Accessibility -> Activation Shortcuts -> Disable sticky and slow keys after (Can type letters, no max length for letters only). Accessibility -> Mouse Navigation -> Maximum speed/Pointer acceleration (No letters allowed, no max length for letters only). Notifications -> Hide After (Can type letters, no max length). Window Management -> Window Behaviour -> Focus -> Delay focus by (No letters allowed, can't type more than 4 numbers). Window Management -> Window Behaviour -> Focus -> Raise on hover, delayed by (No letters allowed, can't type more than 4 numbers). Window Management -> Window Behaviour -> Movement -> Screen edge/window/center snap zone (No letters allowed, can't type more than 2 numbers). General Behaviour -> Double-click interval (Can type letters, no max length).
Git commit 0a37f15fb2817480d2dbe11ea420e39a3f94ecd2 by Nate Graham. Committed on 23/06/2025 at 16:07. Pushed by ngraham into branch 'master'. KCM: limit spinbox length Otherwise they keep expanding as you keep typing, which is fairly silly. FIXED-IN: 6.4.1 M +14 -1 kcm/ui/OutputPanel.qml M +4 -1 kcm/ui/Panel.qml https://invent.kde.org/plasma/kscreen/-/commit/0a37f15fb2817480d2dbe11ea420e39a3f94ecd2
Git commit 12d9cc4974ad903f7bc2c26a1514ea9b9a86b358 by Nate Graham. Committed on 23/06/2025 at 16:14. Pushed by ngraham into branch 'Plasma/6.4'. KCM: limit spinbox length Otherwise they keep expanding as you keep typing, which is fairly silly. FIXED-IN: 6.4.1 (cherry picked from commit 0a37f15fb2817480d2dbe11ea420e39a3f94ecd2) Co-authored-by: Nate Graham <nate@kde.org> M +14 -1 kcm/ui/OutputPanel.qml M +4 -1 kcm/ui/Panel.qml https://invent.kde.org/plasma/kscreen/-/commit/12d9cc4974ad903f7bc2c26a1514ea9b9a86b358
Thanks for that long list. This is a general problem, unfortunately, that would be ideally solved with a better library component. The problem right now is that QQC2.SpinBox is fairly limited, and in particular it has no facilities for putting a suffix at the end of the number in a way that's clean. Doing this requires a lot of boilerplate code that needs to be duplicated for every one, and this means number handling is slightly different. It's kind of a mess right now.