Skip to content

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

Arjen Hiemstra requested to merge work/cherry-pick-c48aa7ed into Plasma/6.1

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.

BUG: 453797

(cherry picked from commit c48aa7ed)

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

Merge request reports