| Summary: | The "Show last" spinbox can temporarily be made wider than the Configure panel by typing in an impossibly large number | ||
|---|---|---|---|
| Product: | [Applications] plasma-systemmonitor | Reporter: | postix <postix> |
| Component: | general | Assignee: | KSysGuard Developers <ksysguard-bugs> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | ahiemstra, cwo.kde, john.kizer, plasma-bugs-null |
| Priority: | NOR | ||
| Version First Reported In: | 5.27.3 | ||
| Target Milestone: | --- | ||
| Platform: | openSUSE | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/plasma/libksysguard/-/commit/b4402b06d530e1d68ccc6d29eb4f4b69a0e9b841 | Version Fixed/Implemented In: | 6.4.0 |
| Sentry Crash Report: | |||
| Attachments: | Screenshot | ||
Are there instances in the application where a plausible entry can result in this phenomenon? Causing this overflow requires manually typing in a duration longer than the measurable age of the universe :-) > Are there instances in the application where a plausible entry can result in this phenomenon?
No that I know of. It surely makes sense to restrict the range of numbers to something sane in the first place.
Anyway, the overflowing shouldn't occur imo nonetheless under any circumstance. It just doesn't make a good impression. :)
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libksysguard/-/merge_requests/410 The range of numbers is constrained (in this case to 2^31-1, which is still a ridiculously large number and attempting anything like it seems to hang the system monitor for me), But this particular input is a free input field that allows you to type anything; that's because the unit is part of the entry field, and qml spinboxes in that case allow any input and then parse it later. It's not optimal, but that's the way this component works right now. But we can constrain it to a reasonable width, so that at least it won't grow beyond the window boundary. Git commit b4402b06d530e1d68ccc6d29eb4f4b69a0e9b841 by Christoph Wolk. Committed on 12/05/2025 at 11:59. Pushed by cwo into branch 'master'. faces: set maximum width for arbitrary input spinboxes The angle spinboxes for piechart and the duration spinbox for linechart allow arbitrary input, but use default (implicit) sizing. This means that user input is not constrained by the from/to settings of the spinbox, and the width of the control can grow without bounds, even beyond the constraints of the window. Such large inputs are generally pointless (and will likely fail anyway when the spinbox input is parsed). But we can fix the graphical glitch to look less broken. This change sets a maximum value for the length of these spinboxes that matches the fixed-width spinboxes used on their pages. FIXED-IN: 6.4.0 M +1 -0 faces/facepackages/linechart/contents/ui/Config.qml M +2 -0 faces/facepackages/piechart/contents/ui/Config.qml https://invent.kde.org/plasma/libksysguard/-/commit/b4402b06d530e1d68ccc6d29eb4f4b69a0e9b841 |
Created attachment 157588 [details] Screenshot STEPS TO REPRODUCE 1. Open System Monitor 2. Go to History 3. Edit page 4. Enter a looong number for "Amount of History to keep" OBSERVED RESULT The input field flows over and goes under the scrollbar. When saving, the input field contains a "0". SOFTWARE/OS VERSIONS Operating System: openSUSE Tumbleweed 20230322 KDE Plasma Version: 5.27.3 KDE Frameworks Version: 5.104.0 Qt Version: 5.15.8 Kernel Version: 6.2.6-1-default (64-bit) Graphics Platform: Wayland