Bug 500355

Summary: "Discrete" Label for Graphics Processor is Slightly Offset Vertically
Product: [Applications] kinfocenter Reporter: Eamonn Rea <eamonnrea>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nate, sitter
Priority: NOR    
Version First Reported In: 6.3.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Info Center Discrete Label Offset Issue

Description Eamonn Rea 2025-02-18 22:35:51 UTC
Created attachment 178555 [details]
Info Center Discrete Label Offset Issue

SUMMARY
The green "discrete" label for Graphics Processor in Info Center is slightly offset too much vertically. The top of the green box is aligned with the top of the GPU label text, whereas it should be the center of that text.

This also creates additional spacing between the "Graphics Processor" label and the "Manufacturer" label, whereas ideally this label would not impact this spacing. Even when aligned in a more expected way it should not create spacing between "Memory" and "Graphics Processor", and "Graphics Processor" and "Manufacturer".

I don't recall seeing this label in Plasma 6.3.0, so I don't think it's a regression. I believe it is new in Plasma 6.3.1.

STEPS TO REPRODUCE
1. Open Info Center
2. Observe "discrete" label is slightly offset vertically.

OBSERVED RESULT
The "discrete" label is slightly offset.

EXPECTED RESULT
The "discrete" label should not be offset.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.3.1
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Graphics Platform: Wayland


ADDITIONAL INFORMATION
Comment 1 Nate Graham 2025-02-18 23:37:58 UTC
Can reproduce at the default font settings, but it's a bit subtle. I suspect you're using non-default font settings which makes this more obvious. Is that accurate?
Comment 2 Eamonn Rea 2025-02-18 23:40:43 UTC
I am using the Inter font so in that regard, yes for sure :-) But as for font sizing defaults, I configured them many years ago and am unsure what the defaults were back then or if they have changed since.
Comment 3 Bug Janitor Service 2025-02-19 13:54:58 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kinfocenter/-/merge_requests/233
Comment 4 Eamonn Rea 2025-02-19 17:11:53 UTC
Apologies for making this specific to "discrete", I just noticed on my laptop there is an equivalent marker for "Integrated".
Comment 5 Harald Sitter 2025-02-21 12:03:35 UTC
Git commit 731970262ca47c22d1054b541904206c65d1830d by Harald Sitter.
Committed on 21/02/2025 at 12:01.
Pushed by sitter into branch 'master'.

about: align gpu pills more neatly

previously we intentionally shoved everything to the top so it looks
good even when multiple lines are on the value side. it occurred to me
that we can just do this conditionally and achive the same multiline
result while also looking properly aligned when not dealing with
multilines

M  +1    -1    kcms/about-distro/src/GPUEntryFactory.cpp
M  +3    -2    kcms/about-distro/src/ui/main.qml

https://invent.kde.org/plasma/kinfocenter/-/commit/731970262ca47c22d1054b541904206c65d1830d
Comment 6 Harald Sitter 2025-02-21 12:13:46 UTC
Git commit 4649a54427513e59186323cf6dab594561b805a8 by Harald Sitter.
Committed on 21/02/2025 at 12:11.
Pushed by sitter into branch 'Plasma/6.3'.

about: align gpu pills more neatly

previously we intentionally shoved everything to the top so it looks
good even when multiple lines are on the value side. it occurred to me
that we can just do this conditionally and achive the same multiline
result while also looking properly aligned when not dealing with
multilines


(cherry picked from commit 731970262ca47c22d1054b541904206c65d1830d)

Co-authored-by: Harald Sitter <sitter@kde.org>

M  +1    -1    kcms/about-distro/src/GPUEntryFactory.cpp
M  +3    -2    kcms/about-distro/src/ui/main.qml

https://invent.kde.org/plasma/kinfocenter/-/commit/4649a54427513e59186323cf6dab594561b805a8
Comment 7 Bug Janitor Service 2025-02-23 14:53:56 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kinfocenter/-/merge_requests/238
Comment 8 Oliver Beard 2025-02-25 16:45:43 UTC
Git commit 7cc7fe9783a68e086369bd0b96b280082097d60a by Oliver Beard.
Committed on 25/02/2025 at 16:36.
Pushed by olib into branch 'master'.

kcms/about-distro: Fix hint expanding height of parent layout
Instead, use an label with padding to match the height of normal text. A background is used to fill this padded area.

If smallFont is larger than normal text, the text will draw outside the label which would be restricted to the same height as normal text by negative padding. I don't see this as worth fixing - if the small font is larger than normal text, that would be the problem, not this...

When valueLabel spans multiple lines, it will be vertically centered.

M  +22   -13   kcms/about-distro/src/ui/main.qml

https://invent.kde.org/plasma/kinfocenter/-/commit/7cc7fe9783a68e086369bd0b96b280082097d60a