-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX(theme): Adapt Qt behavior change regarding padding in QMenu #5771
Conversation
Qt >= 5.12.6 has changed the behavior of the padding value in style sheets for QMenus. Previously the padding was counted from the start of the QMenu::item, ignoring any decorations. The new behavior starts counting the padding after any decoration item. Without this change, Mumble compiled against Qt versions >= 5.12.6 will have effectively double the padding on all QMenus containing icons or check-marks. However, there are multiple issues with padding in QMenus pending on the Qt side so this change may regress later on. Fixes mumble-voip#5462
Since the introduction of the menu bar, action icons were hidden in it. This commit enables the display of existing icons for actions which are not checkable (otherwise it would clash with the check-mark). Additionally, the "heart" icon is enabled for "Add Friend..." and the "i" icon is used for user "Information..."
This whole problem is quite possibly the source of the alignment trouble in #4792 as it also affects user and channel QMenus in the TreeView |
Are you ok with menus without checkmark or icon to not reserve space on the left? If you want it consistent with the Qt internal theme, this would need a workaround. |
Yes that's fine for me |
Note that in 1.4 we are still using git submodules for managing the theme, so backporting this fix is not as easy as it might appear. And given that the issue is not really deal-breaking, I'd vote for not actually bothering to backport it. Thus, it would only ship in Mumble 1.5. |
I tend to agree, especially considering that running/compiling Mumble against a lower 5.x version of Qt would result in the opposite problem. And on Linux there might be some distros still shipping or depending on older versions of Qt. |
Fixes #5462
This merge request contains two commits:
This needs additional testing for Qt >= 5.14.1, because of the fix for QTBUG-80506 described hereIf QMenus without icons, but WITH checkable items are too far right with Qt >= 5.14.1 (and also I understand all the padding bug reports at Qt correctly), the right margin of indicator needs to be removed
I think this change is good to go for Qt >= 5.12. For Qt 6 I do not know.
I consider the merge of the second commit optional.