Bug 464398 - Kirigami app menus look & behave too differently from those in QtWidgets apps
Summary: Kirigami app menus look & behave too differently from those in QtWidgets apps
Status: RESOLVED UPSTREAM
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: Not decided
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-17 04:42 UTC by Puspam Adak
Modified: 2023-04-21 16:42 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
How popups look in normal QT apps (with transparency enabled in settings) (85.65 KB, image/png)
2023-01-17 04:42 UTC, Puspam Adak
Details
How popups look in Kirigami apps (no background transparency) (31.89 KB, image/png)
2023-01-17 04:44 UTC, Puspam Adak
Details
Kirigami popups do not close on clicking outside the window (467.80 KB, video/mp4)
2023-01-17 13:32 UTC, Puspam Adak
Details

Note You need to log in before you can comment on or make changes to this bug.
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.