Bug 499290 - With non-default font or font size or long device names, battery level UI in Info Center -> Energy is cropped poorly
Summary: With non-default font or font size or long device names, battery level UI in ...
Status: RESOLVED FIXED
Alias: None
Product: kinfocenter
Classification: Applications
Component: general (other bugs)
Version First Reported In: 6.1.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: regression
: 500509 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-01-29 20:13 UTC by Wren Turkal
Modified: 2025-02-21 21:57 UTC (History)
4 users (show)

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


Attachments
screen cap of the battery level's UI in info center (85.80 KB, image/png)
2025-01-29 20:13 UTC, Wren Turkal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wren Turkal 2025-01-29 20:13:00 UTC
Created attachment 177801 [details]
screen cap of the battery level's UI in info center

SUMMARY
The UI for the battery levels in the Info Center is cropped poorly.

STEPS TO REPRODUCE
1. Open the Info Center app
2. Open the Energy tab
3. Look at the screen

OBSERVED RESULT
The battery levels are cropped cutting off the battery levels.

EXPECTED RESULT
The UI is so beautiful that I cry as it make me realize something significant about my life that I never realized before.

SOFTWARE/OS VERSIONS
Windows: nope
macOS: nada
(available in the Info Center app, or by running `kinfo` in a terminal window)
Operating System: Fedora Linux 42
KDE Plasma Version: 6.2.90
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.1
Kernel Version: 6.13.0-0.rc7.20250114gitc45323b7560e.56.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i7-1165G7 @ 2.80GHz
Memory: 31.1 GiB of RAM
Graphics Processor: Intel® Iris® Xe Graphics

ADDITIONAL INFORMATION
I have include a screenshot showing the problem. I believe I have modified the default font sizes a bit, but I frankly do not remember if that's true or not.
Comment 1 Wren Turkal 2025-01-30 00:00:51 UTC
For clarification, I am running Fedora Rawhide. I just noticed that my report doesn't indicate that.
Comment 2 TraceyC 2025-01-30 19:48:21 UTC
Reproduced on git-master, Solus
General font: Waree 10pt
Other non-fixed are Noto Sans 10pt (defaults)

Changing the General Font to Noto Sans 10pt eliminates the cropping
Changing it back to Waree, the text cropping shows up again
It seems that the boxes aren't properly calculating margins / padding per font
Comment 3 Nate Graham 2025-01-30 21:36:10 UTC
Thanks. Looks like another casualty of gridUnit no longer adjusting with the font size automatically.
Comment 4 Wren Turkal 2025-01-30 21:41:31 UTC
Glad this seems to be an easy one.
Comment 5 Bug Janitor Service 2025-01-31 21:36:45 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kinfocenter/-/merge_requests/221
Comment 6 Ismael Asensio 2025-02-09 12:28:50 UTC
Git commit f63e886a7c25f05bd03e54e9c6f571250588135a by Ismael Asensio.
Committed on 09/02/2025 at 12:20.
Pushed by iasensio into branch 'master'.

kcms/energy: Improve layout of the device selector

Port the device selector to an actual ListView instead of Row+Repeater
combo, so we can use the implicit height of the delegate, instead of
imposing a fixed height, which fails for bigger fonts.

Also improve the layout by centering the available buttons, and adapt
their width to the number of devices, so it doesn't need horizontal
scrolling and resembles more a Navigation bar

While at it, also simplify the code by using the ListView `currentItem`
to initialize and select the current device.

As an added benefit there is now keyboard navigation
Related: bug 499350
FIXED-IN: 6.4

M  +123  -118  kcms/energy/ui/main.qml

https://invent.kde.org/plasma/kinfocenter/-/commit/f63e886a7c25f05bd03e54e9c6f571250588135a
Comment 7 Nate Graham 2025-02-21 21:57:53 UTC
*** Bug 500509 has been marked as a duplicate of this bug. ***