Bug 501764

Summary: Icons in sidebar tab widgets should be centred
Product: [Applications] okular Reporter: David Koer <nilsolm>
Component: generalAssignee: Okular developers <okular-devel>
Status: RESOLVED NOT A BUG    
Severity: wishlist    
Priority: NOR    
Version First Reported In: 24.12.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Okular with the sidebar expanded

Description David Koer 2025-03-19 20:18:56 UTC
Created attachment 179584 [details]
Okular with the sidebar expanded

SUMMARY
The tab widgets in the sidebar contain 22px icons. Currently, the icons are left aligned instead of being centred in the widget. This isn't really a problem unless the sidebar is extended to be considerably wider than 22px and the icons keep their alignment to the left. It would probably look better if the icons were centred instead.

STEPS TO REPRODUCE
1. Make sure the sidebar is displayed
2. Expand the sidebar such that the width of the tab widgets exceeds the icon width.

OBSERVED RESULT
The icons remain left aligned as the tab width expands (see attached screenshot).

EXPECTED RESULT
The icons should be centred instead.

SOFTWARE/OS VERSIONS

Operating System: Arch Linux 
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2

ADDITIONAL INFORMATION

Gwenview similarly has a sidebar with multiple tabs. I haven't looked, but I assume those are QTabWidgets as well. Unlike in Okular, the icons are centred even as the sidebar expands. If the tab width exceeds a certain limit, both the icon and the label are displayed side by side and remain centred. That would probably be a better approach.
Comment 1 Laura David Hurka 2025-03-20 10:14:49 UTC
Here on KDE Neon, the icons are centered. I guess Arch and Neon configure it differently somewhere, or one of us two has configured it somehow.
Comment 2 David Koer 2025-03-20 10:56:46 UTC
(In reply to Laura David Hurka from comment #1)
> Here on KDE Neon, the icons are centered. I guess Arch and Neon configure it
> differently somewhere, or one of us two has configured it somehow.

Actually, upon doing some further testing, it turns out this has nothing to do with Okular. The icons are indeed centred with the default Breeze style. It only seems to occur when using a different application style (specifically Klassy) so the bug is down to a third-party project rather than KDE.

I suppose this can be closed then. My bad. Though I still think displaying both the icon and the label when there is enough space for it (like in Gwenview) would be a worthwhile addition.