Bug 1392398 - Doesn't work in Cinnamon
Summary: Doesn't work in Cinnamon
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: appmenu-qt5
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Alternative GTK desktop environments
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-07 12:39 UTC by Mario Blättermann
Modified: 2017-07-06 13:52 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-06 13:52:12 UTC
Type: Bug


Attachments (Terms of Use)

Description Mario Blättermann 2016-11-07 12:39:39 UTC
Description of problem:
I've installed cinnamon-applet-globalappmenu. Works fine with gtk2, gtk3 (also wxwidgets), Libreoffice and Qt4. But it doesn't work with Qt5, so I think it's a problem with appmenu-qt5. 

Version-Release number of selected component (if applicable):
0.3.0+16.10.20160628.1


First I thought there's a package conflict with qt5ct. No file conflict, but with an environment variable: appmenu-qt5 sets it to QT_QPA_PLATFORMTHEME=appmenu-qt5, where it has already been set by qt5ct to QT_QPA_PLATFORMTHEME=qt5ct. So it happened that qt5ct won't start with an error message that this variable hasn't been set correctly. But even after uninstalling qt5ct, it still doesn't work.

The effect is that all Qt5 apps, bot KDE and pure ones, don't export their menu bars. Moreover, it's no longer possible to set the Qt5 theme to "gtk2". Well, I can do this in the KDE system settings, but the changes won't be applied. Qt5 apps seem to use the ancient "Cleanlooks" theme as a fallback solution.

To get the gtk2 look back to Qt5 apps, there's currently only one way: setting QT_QPA_PLATFORMTHEME='gtk2'. So I get the uniform look again, but of course, appmenu-qt5 is still unable to export the menu bars. It works also with "export QT_STYLE_OVERRIDE='gtk2'", but without global manu bars.

No final solution to get Qt5 global menu bars, though. What could we do here? Any idea? And after all, the conflict with qt5ct needs to be solved.

Comment 1 Mario Blättermann 2016-11-07 17:05:45 UTC
To get rid of the system-wide QT_QPA_PLATFORMTHEME setting, I've uninstalled appmenu-qt5-profile.d for the time being. Then I tried to assign multiple values to QT_QPA_PLATFORMTHEME:

export QT_QPA_PLATFORMTHEME='gtk2:appmenu-qt5'
applies only the configured gtk2 theme.

export QT_QPA_PLATFORMTHEME='appmenu-qt5:gtk2'
does nothing.

Obviously this environment variable doesn't accept multiple values.

Comment 2 Fedora Admin XMLRPC Client 2017-07-05 20:24:37 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 3 leigh scott 2017-07-06 13:52:12 UTC
(In reply to Mario Blättermann from comment #0)
> Description of problem:
> I've installed cinnamon-applet-globalappmenu. Works fine with gtk2, gtk3
> (also wxwidgets), Libreoffice and Qt4. But it doesn't work with Qt5, so I
> think it's a problem with appmenu-qt5. 
> 
> Version-Release number of selected component (if applicable):
> 0.3.0+16.10.20160628.1
> 
> 
> First I thought there's a package conflict with qt5ct. No file conflict, but
> with an environment variable: appmenu-qt5 sets it to
> QT_QPA_PLATFORMTHEME=appmenu-qt5, where it has already been set by qt5ct to
> QT_QPA_PLATFORMTHEME=qt5ct. So it happened that qt5ct won't start with an
> error message that this variable hasn't been set correctly. But even after
> uninstalling qt5ct, it still doesn't work.
> 

cinnamon-session sets the QT_QPA_PLATFORMTHEME=qt5ct env not qt5ct

https://github.com/linuxmint/cinnamon-session/blob/master/cinnamon-session/main.c#L391

You are free to override it

sudo cp /usr/share/doc/appmenu-qt5/appmenu-qt5.sh /etc/profile.d/

doing so will break qt5ct

https://bugzilla.redhat.com/show_bug.cgi?id=1371739

> The effect is that all Qt5 apps, bot KDE and pure ones, don't export their
> menu bars. Moreover, it's no longer possible to set the Qt5 theme to "gtk2".
> Well, I can do this in the KDE system settings, but the changes won't be
> applied. Qt5 apps seem to use the ancient "Cleanlooks" theme as a fallback
> solution.
> 
> To get the gtk2 look back to Qt5 apps, there's currently only one way:
> setting QT_QPA_PLATFORMTHEME='gtk2'. So I get the uniform look again, but of
> course, appmenu-qt5 is still unable to export the menu bars. It works also
> with "export QT_STYLE_OVERRIDE='gtk2'", but without global manu bars.
> 
> No final solution to get Qt5 global menu bars, though. What could we do
> here? Any idea? And after all, the conflict with qt5ct needs to be solved.


Note You need to log in before you can comment on or make changes to this bug.