Bug 453797 - Text clashes between system monitor applets in Pie Chart mode
Summary: Text clashes between system monitor applets in Pie Chart mode
Status: RESOLVED FIXED
Alias: None
Product: plasma-systemmonitor
Classification: Applications
Component: general (show other bugs)
Version: 5.24.4
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-14 19:20 UTC by Lastique
Modified: 2024-06-13 16:14 UTC (History)
3 users (show)

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


Attachments
Screenshot illustrating the problem. (5.36 KB, image/png)
2022-05-14 19:20 UTC, Lastique
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lastique 2022-05-14 19:20:45 UTC
Created attachment 148834 [details]
Screenshot illustrating the problem.

SUMMARY

In some cases, text printed by a system monitor in Pie Chart mode (e.g. RAM and Swap usage) clashes with adjacent applets when placed on a panel. See the attached screenshot with two applets, for RAM and swap usage.

STEPS TO REPRODUCE

1. Place two system monitor applets next to each other on a horizontal panel. For example, RAM and swap usage.
2. Make sure the applets are running in Pie Chart mode and have Text-Only sensors to display text in the middle.


OBSERVED RESULT

With some text readings the text between the applets overlap. The text may also overlap with other adjacent applets.

EXPECTED RESULT

Text should not overlap. Font size should be adjusted automatically to avoid clashing or cropping. Ideally, font should be configurable in the applet settings.

SOFTWARE/OS VERSIONS

Operating System: Kubuntu 22.04
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Kernel Version: 5.15.0-30-lowlatency (64-bit)
Graphics Platform: X11
Processors: 16 × 12th Gen Intel® Core™ i7-12700K
Memory: 31.1 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2
Comment 1 Bug Janitor Service 2024-06-11 13:57:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libksysguard/-/merge_requests/356
Comment 2 Arjen Hiemstra 2024-06-13 08:07:23 UTC
Git commit c48aa7edff0a451499415f000cf32a1d503dd956 by Arjen Hiemstra.
Committed on 13/06/2024 at 08:06.
Pushed by ahiemstra into branch 'master'.

faces/pie: Ensure text doesn't overflow the face

This ensures the text for total sensors doesn't overflow the face, using
a few tricks. Most prominently, this based hiding/showing decisions on
multiples of line height. This makes showing/hiding a little less
arbitrary and more based on relevant values. It also enables wrapping to
two lines for the primary value display, which will (usually) push the
unit symbol to its own line when the face gets very small. Finally, if
we determine there is no way to fit the text, we hide it completely
rather than letting things overflow.

M  +1    -1    faces/facepackages/piechart/contents/ui/CompactRepresentation.qml
M  +3    -2    faces/facepackages/piechart/contents/ui/PieChart.qml
M  +34   -10   faces/facepackages/piechart/contents/ui/UsedTotalDisplay.qml

https://invent.kde.org/plasma/libksysguard/-/commit/c48aa7edff0a451499415f000cf32a1d503dd956
Comment 3 Arjen Hiemstra 2024-06-13 08:55:46 UTC
Git commit 65119abd63b1841066c241e9a735c1872262a9a0 by Arjen Hiemstra.
Committed on 13/06/2024 at 08:53.
Pushed by ahiemstra into branch 'Plasma/6.1'.

faces/pie: Ensure text doesn't overflow the face

This ensures the text for total sensors doesn't overflow the face, using
a few tricks. Most prominently, this based hiding/showing decisions on
multiples of line height. This makes showing/hiding a little less
arbitrary and more based on relevant values. It also enables wrapping to
two lines for the primary value display, which will (usually) push the
unit symbol to its own line when the face gets very small. Finally, if
we determine there is no way to fit the text, we hide it completely
rather than letting things overflow.


(cherry picked from commit c48aa7edff0a451499415f000cf32a1d503dd956)

Co-authored-by: Arjen Hiemstra <ahiemstra@heimr.nl>

M  +1    -1    faces/facepackages/piechart/contents/ui/CompactRepresentation.qml
M  +3    -2    faces/facepackages/piechart/contents/ui/PieChart.qml
M  +34   -10   faces/facepackages/piechart/contents/ui/UsedTotalDisplay.qml

https://invent.kde.org/plasma/libksysguard/-/commit/65119abd63b1841066c241e9a735c1872262a9a0