Bug 464398

Summary: Kirigami app menus look & behave too differently from those in QtWidgets apps
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: Puspam Adak <puspitaadak9876>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED UPSTREAM    
Severity: normal CC: nate, notmart
Priority: NOR    
Version: unspecified   
Target Milestone: Not decided   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: How popups look in normal QT apps (with transparency enabled in settings)
How popups look in Kirigami apps (no background transparency)
Kirigami popups do not close on clicking outside the window

Description Puspam Adak 2023-01-17 04:42:41 UTC
Created attachment 155365 [details]
How popups look in normal QT apps (with transparency enabled in settings)

SUMMARY
Kirigami application popup menus are highly inconsistent with QT apps & look ugly on desktops.
Normal QT app's popups have a little amount of padding & their transparency can be tweaked by the global theme settings, which look good with a blur effect. But Kirigami apps do not use that theme & default to an opaque style by default with more padding.

Another problem is that popups should close on clicking outside the application, but this is not the case with Kirigami-based popups.

STEPS TO REPRODUCE
1. Open any QT-based app (like Dolphin).
2. Open any Kirigami-based app (like System Monitor).
3. Click on the menu icons & compare the popup menu differences.

OBSERVED RESULT
The popups look highly inconsistent

EXPECTED RESULT
Kirigami-based popups should respect the application theme (transparency, blur & padding) & should close on clicking outside the application window.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.15.88-1-lts (64-bit)
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8
Comment 1 Puspam Adak 2023-01-17 04:44:39 UTC
Created attachment 155366 [details]
How popups look in Kirigami apps (no background transparency)
Comment 2 Puspam Adak 2023-01-17 13:32:12 UTC
Created attachment 155379 [details]
Kirigami popups do not close on clicking outside the window
Comment 3 Nate Graham 2023-01-17 21:48:42 UTC
I'm afraid this is the way menus are implemented in QtQuickControls, which is the Qt UI toolkit that Kirigami is based on. Ultimately it's not something we can fix in KDE code; QQC itself needs to be changed to implement menus as separate windows that can be independently styled and themed by the app style and compositor, as in QtWidgets.

I do agree with you that this would be desirable, in general.
Comment 4 Puspam Adak 2023-04-21 15:34:59 UTC
To my knowledge, plasmashell uses QML. But it has traditional popup menus.
So it seems not impossible to implement them for Kirigami apps too.
Comment 5 Nate Graham 2023-04-21 16:42:55 UTC
Yes, each individual app can manually create C++ QMenus, invoked from QML. It's a bug pain though and not really a generic solution.