Bug 463498 - System Monitor CPU line chart legend text gets cut off easily
Summary: System Monitor CPU line chart legend text gets cut off easily
Status: RESOLVED FIXED
Alias: None
Product: plasma-systemmonitor
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: HI normal
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords: usability
: 471069 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-12-26 19:26 UTC by jnidositko
Modified: 2023-11-01 16:40 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0
Sentry Crash Report:


Attachments
Screenshot of Line chart view at default/normal. (83.24 KB, image/png)
2022-12-26 19:26 UTC, jnidositko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jnidositko 2022-12-26 19:26:30 UTC
Created attachment 154832 [details]
Screenshot of Line chart view at default/normal.

SUMMARY
***
System Monitor line view does not show all 16 cores on a 1080p screen
***


STEPS TO REPRODUCE
1. Run System Monitor with Line chart view (the apparent default) on a machine with 16 cores using a 1080p screen
2. Observe the display of CPU usage.

OBSERVED RESULT
The percentage display for all 16 cores is not visible.

EXPECTED RESULT
Line chart view should resize the panel in the same manner that the Horizontal Bar view does in order to show all cores without the need to scroll (which incidentally can only be done with a scroll wheel). Or you could probably just drop the "Total Usage" text from the display and the widgets for all cores would probably fit.  Note: You *can* get all the CPU cores visible if the window is expanded to full screen, but I don't see that as a normal use-case, and other widgets resize themselves to provide an appropriate view for the contents, so the Line chart view should do the same.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kernel 6.0.12-zen1-1-zen
(available in About System)
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7

ADDITIONAL INFORMATION
Comment 1 Arjen Hiemstra 2023-01-11 11:27:02 UTC
There's a few tradeoffs that need to be made with regards to the layout of the page. By default, we try to keep each row at the same height and prefer not to scroll the entire page. Meanwhile, the legend tries to accomplish a pretty complex multi-column layout within its allowed space, but is also limited by certain sizing restrictions, like how much space can be used at minimum and maximum for a column. Unfortunately this can lead to certain size combinations that (partially) hide some of the legend. There isn't really any easy solution here, as changing things one way is going to break things in other ways.

One thing you may want to try is to set the "height" for the first row to "maximum" rather than "balanced". This will shrink the other two rows while allowing the first row to claim more space.
Comment 2 Nate Graham 2023-04-03 20:35:50 UTC
This can't truly be intentional; it represents quite an obvious visual papercut. I get that there are trade-offs involved, but we ought to choose the one that doesn't cause parts of the legend to get cut off with common hardware and window sizes. If it isn't easy for the current code to accommodate all the elements of the legend, the code ought to be changed to make that possible. Another option is to make the legend text shorter they they all show common elements. Right now the legend text is quite redundant for graphs that show a lot of similar things.
Comment 3 Nate Graham 2023-09-15 16:01:39 UTC
*** Bug 471069 has been marked as a duplicate of this bug. ***
Comment 4 Arjen Hiemstra 2023-10-31 17:20:54 UTC
Git commit 090d17a73b2b9de08d3b1075752f0309499b592a by Arjen Hiemstra.
Committed on 26/10/2023 at 17:16.
Pushed by ahiemstra into branch 'master'.

PageContents: Use loaders for conditional objects and fix some sizing issues

Use ConditionalLoader for objects where we choose between two types so
we can avoid creating the second object. While at it, fix some sizing
issues with columns that were not properly respecting the face sizes.

M  +58   -58   src/page/PageContents.qml

https://invent.kde.org/plasma/plasma-systemmonitor/-/commit/090d17a73b2b9de08d3b1075752f0309499b592a
Comment 5 Arjen Hiemstra 2023-10-31 17:24:23 UTC
Git commit a9b04f2ba18b630bb86f404a4ffcf4ce18e1ab75 by Arjen Hiemstra.
Committed on 31/10/2023 at 18:18.
Pushed by ahiemstra into branch 'master'.

Don't shrink legend below its implicit height when in "constrained" mode

This will allow plasma-systemmonitor to properly account for the entire
legend's height.

M  +1    -4    faces/facepackages/barchart/contents/ui/FullRepresentation.qml
M  +1    -5    faces/facepackages/linechart/contents/ui/FullRepresentation.qml
M  +1    -4    faces/facepackages/piechart/contents/ui/FullRepresentation.qml

https://invent.kde.org/plasma/libksysguard/-/commit/a9b04f2ba18b630bb86f404a4ffcf4ce18e1ab75