Bug 488863 - Text inside pie chart overflows to next line
Summary: Text inside pie chart overflows to next line
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Monitor (show other bugs)
Version: 6.1.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2024-06-21 05:39 UTC by Miroslav Jarý
Modified: 2024-08-28 18:41 UTC (History)
5 users (show)

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


Attachments
Overflow screenshot (on 42px panel) (3.77 KB, image/webp)
2024-06-21 05:39 UTC, Miroslav Jarý
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Miroslav Jarý 2024-06-21 05:39:26 UTC
Created attachment 170720 [details]
Overflow screenshot (on 42px panel)

***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
When using the pie chart variant with text inside it, the text does not fit on one line. Started happening after update to Plasma 6.1. Can reproduce on e.g. "Total CPU usage" default widget, on panel heights 40 - 50px.
(But with e.g. Memory usage, text overflows even of heights 50px+)

STEPS TO REPRODUCE
1. Set panel height to 40 - 50px.
2. Add "Total CPU Usage" widget

OBSERVED RESULT
Text inside the pie chart is split to two lines

EXPECTED RESULT
Text should be on a single line, as pre 6.1 update.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.1.0
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.1
Kernel Version: 6.6.34-1-lts (64-bit)
Graphics Platform: Wayland
Processors: 12 × 13th Gen Intel® Core™ i5-13420H
Memory: 15,4 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: LENOVO
Product Name: 82XV
System Version: LOQ 15IRH8
Comment 1 15c730840a66 2024-06-23 04:06:30 UTC
Looks like this is an intentional fix for bug 453797, but that commit does seem to be causing the text to wrap (or disappear completely) earlier than it really should.
Comment 2 Nate Graham 2024-06-25 23:35:07 UTC
Yeah, it seems like a regression from the change to allow it to be multi-line. This is fine when the pie chart is large, but not when it's small.
Comment 3 Bug Janitor Service 2024-06-28 15:45:26 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libksysguard/-/merge_requests/360
Comment 4 Arjen Hiemstra 2024-06-28 15:50:34 UTC
There is only so much we can do here, since the area that is available is quite limited. Ultimately with the options I had I found wrapping the text to be the best solution. The above MR relaxes the constraints a little bit, which means wrapping happens a bit later, at the tradeoff of text begin rendered on top of the chart, with potential contrast issues.
Comment 5 Arjen Hiemstra 2024-07-03 15:53:34 UTC
Git commit 53c89c046014e2deaf4b21a3dae9611a53d35dbc by Arjen Hiemstra.
Committed on 03/07/2024 at 15:07.
Pushed by ahiemstra into branch 'master'.

faces/pie: Allow center text to overlap the chart at small sizes

We now constrain the text so it never goes outside the central pie area,
but for small sizes this would cause things to wrap too early for
people's tastes. This change allows the text to overflow onto the pie
chart while still being constrained to the total applet size. When this
happens we render the text with an outline to improve contrast.

outline

M  +16   -2    faces/facepackages/piechart/contents/ui/UsedTotalDisplay.qml

https://invent.kde.org/plasma/libksysguard/-/commit/53c89c046014e2deaf4b21a3dae9611a53d35dbc