Bug 491714

Summary: Song action icons are slightly misaligned
Product: [Applications] Elisa Reporter: Fabio S. Reszko Jr. <s.reszkojr>
Component: generalAssignee: Matthieu Gallien <matthieu_gallien>
Status: RESOLVED FIXED    
Severity: minor CC: cwo.kde, nate
Priority: NOR    
Version First Reported In: 24.05.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 24.12.0
Sentry Crash Report:
Attachments: Video showing the misalignment

Description Fabio S. Reszko Jr. 2024-08-14 12:48:56 UTC
Created attachment 172617 [details]
Video showing the misalignment

***
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
The action icons are slightly misaligned because of the song's duration label size difference

OBSERVED RESULT
The action icons are slightly misaligned because of the song's duration label size difference

EXPECTED RESULT
The action icons should be in the same position regardless of the duration label size

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.10.4-arch2-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-8565U CPU @ 1.80GHz
Memory: 11.6 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Comment 1 cwo 2024-08-19 19:21:17 UTC
I can't reproduce this on my computer (same version of Elisa, Tuxedo OS).

This is likely a fonts issue; here the font automatically selects the tabular numbers (which always have equal width), but on yours it does not. This shouldn't be hard to force (the same way it was done recently for the panel clock widget) but it's hard to test without being able to reproduce it. What font are you using?
Comment 2 Bug Janitor Service 2024-08-20 00:45:10 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/605
Comment 3 Nate Graham 2024-08-21 14:12:40 UTC
Git commit 0ad87b0029dc125015876a966eb117673f60581c by Nate Graham, on behalf of Christoph Wolk.
Committed on 21/08/2024 at 14:08.
Pushed by ngraham into branch 'master'.

use tabular numerals for durations and positions

Proportional width fonts that don't default to tabular numerals will
lead to broken lines for tabular display of numbers like durations and
playlist positions, as well as jumping minute numbers for current play
positions. This can also shift the alignment of dependent controls like
buttons. An example for such a font is Inter v4.0.

This change explicitly requests tabular numerals for durations in the
play controls, the playlist, the track browser, and the remaining
playlist duration in the footer, and for playlist positions as well as
the currently playing position. The base metrics are set to use them as
well.

M  +2    -0    src/qml/BaseTheme.qml
M  +2    -0    src/qml/DurationSlider.qml
M  +1    -0    src/qml/MediaPlayListView.qml
M  +2    -0    src/qml/PlayListEntry.qml
M  +2    -0    src/qml/TrackBrowserDelegate.qml

https://invent.kde.org/multimedia/elisa/-/commit/0ad87b0029dc125015876a966eb117673f60581c