Bug 342487 - with AA_DontShowIconsInMenus set true, oxygen still reserves space for icons in menus
Summary: with AA_DontShowIconsInMenus set true, oxygen still reserves space for icons ...
Status: REPORTED
Alias: None
Product: Oxygen
Classification: Plasma
Component: style (show other bugs)
Version: 4.13.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-04 14:10 UTC by Halla Rempt
Modified: 2021-03-09 23:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Halla Rempt 2015-01-04 14:10:16 UTC
If there is an action in a menu that has an icon, and AA_DontShowIconsInMenus is set to true, oxygen still reserves space to the left of the menu entry, between the space for a checkbox and the the entry's text. Oxygen should check whether any of the actions in the menu has iconVisibleInMenu set, and only then reserve this space.

Reproducible: Always
Comment 1 Hugo Pereira Da Costa 2015-01-04 15:15:51 UTC
As far as I understand, what you recommand is equivalent to using QStyleOptionMenuItem->maxIconWidth when allocating space and rendering menu items.
Unfortunately, this breaks when using QStyle (be it oxygen or breeze or others) inside QtQuick control elements, for which this value is always set to zero whether there are icons or not in the menu or not. 
See bug https://bugs.kde.org/show_bug.cgi?id=339106, and fix.

So that this value has to be QMaxed with the 'default' icon size for menus everywhere.

Basically there is no way to fix this bug together with the one mentionned above, due to upstream ...
Comment 2 Hugo Pereira Da Costa 2015-01-04 15:17:24 UTC
Could you check if the issue is also present with Breeze @ KF5 ? Fusion @ KF5 (native Qt style) ? (in case I am missing something else)
Comment 3 Halla Rempt 2015-01-04 15:19:47 UTC
Well, I'm not an expert -- what I mean is that Oxygen (and Breeze) have separate columns for checkbox and the optional icon. Plastique apparently has only one column, so either paints the icon, or the checkbox. Right now, if you disable menu icons, you get a whole column of emptiness in the menu. Though, and here I'm getting confused, not in every menu, for instancenot in Krita's filter menu. I'm just not sure why not.

I have only checked with breeze-4 -- I actually haven't got a working KF5 system yet, and, of course, Krita hasn't been ported either.
Comment 4 Hugo Pereira Da Costa 2015-01-04 15:25:12 UTC
Hi, 

Thanks for testing. I'll double check with Krita about why some menus don't have the extra space.
Still, in bug 339106, comment 7, it is explicitly mentionned that with the mentionned changed, there now always is extra space for the menu, whether there are icons or not ... Maybe you can locally try revert this change (against breeze @ kde4), and see if it fixes your issue.

Thanks in advance,

Hugo
Comment 5 Justin Zobel 2021-03-09 23:58:29 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.