Bug 501633 - When QQC2(-desktop-style) menus are used in Plasma, disabled menu items do not have their labels disabled, only their icons
Summary: When QQC2(-desktop-style) menus are used in Plasma, disabled menu items do no...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (other bugs)
Version First Reported In: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-17 12:00 UTC by cwo
Modified: 2025-03-24 14:14 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.3.4
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cwo 2025-03-17 12:00:59 UTC
SUMMARY

There are a couple of cases where Plasma opens QQC2 menus. This includes, for example, the context menus of notification bodies (either popup or in history), which use Kirigami.SelectableLabel (in turn a QQC2 TextField) or the context menu of the notes widget, which intentionally uses QQC2 for desktop-style context menus in the editable text.

In these menus, items can be disabled as usual if their action is not appropriate, such as copying text with no text selected. But this is not displayed properly – the icon takes on the usual gray color and does not have the hover effect, but the label is displayed in its usual presentation for active elements. This is a rather confusing user experience.

STEPS TO REPRODUCE
1. Right-click a notification body, or the notes widget text

OBSERVED RESULT

Context menu does not have disabled context menus correctly grayed out.

EXPECTED RESULT

Context menu is correctly grayed out, including label.

SOFTWARE/OS VERSIONS

Operating System: Fedora Linux 41
KDE Plasma Version: 6.3.80
KDE Frameworks Version: 6.13.0
Qt Version: 6.8.2
Kernel Version: 6.13.5-200.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-6200U CPU @ 2.30GHz
Memory: 16 GiB of RAM (15.5 GiB usable)
Graphics Processor: Intel® HD Graphics 520


ADDITIONAL INFORMATION

Happens on master and stock Fedora 41.

I have not been able to isolate a minimal test case that exhibits the issue.

Switching QQC2 menu stuff to PC3 menu stuff in the notes widget fixes the issue there (but this is harder with Kirigami.SelectableLabel).

I'm really not sure where the issue is (PC3? Breeze theme? QQC2-deskop-style?) so I'm filing it in plasmashell/general for sorting.
Comment 1 Nate Graham 2025-03-17 16:59:41 UTC
Possibly an issue in KirigamiPlasmaStyle?
Comment 2 Bug Janitor Service 2025-03-19 16:04:24 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/1290
Comment 3 Marco Martin 2025-03-24 14:09:58 UTC
Git commit f40f7459938667e8c66bb0585d8df5957a59a979 by Marco Martin.
Committed on 24/03/2025 at 14:09.
Pushed by mart into branch 'master'.

Use Disabled Text color when needed

With the same logic taken 1:1 from the plugin in qqc2-desktop-style,
notice when the parent item or window is disabled, and change the text
color accordingly

M  +54   -1    src/declarativeimports/kirigamiplasmastyle/plasmatheme.cpp
M  +2    -0    src/declarativeimports/kirigamiplasmastyle/plasmatheme.h
M  +2    -0    src/declarativeimports/plasmacomponents3/ComboBox.qml

https://invent.kde.org/plasma/libplasma/-/commit/f40f7459938667e8c66bb0585d8df5957a59a979
Comment 4 Marco Martin 2025-03-24 14:14:37 UTC
Git commit f37ea393ff97ec5b8ac66ed33028e5c7b7539659 by Marco Martin.
Committed on 24/03/2025 at 14:10.
Pushed by mart into branch 'Plasma/6.3'.

Use Disabled Text color when needed

With the same logic taken 1:1 from the plugin in qqc2-desktop-style,
notice when the parent item or window is disabled, and change the text
color accordingly


(cherry picked from commit f40f7459938667e8c66bb0585d8df5957a59a979)

1c3b580e Use Disabled Text color when needed
32e50e34 Apply 1 suggestion(s) to 1 file(s)
840c5643 fix combo text color

Co-authored-by: Marco Martin <notmart@gmail.com>

M  +54   -1    src/declarativeimports/kirigamiplasmastyle/plasmatheme.cpp
M  +2    -0    src/declarativeimports/kirigamiplasmastyle/plasmatheme.h
M  +2    -0    src/declarativeimports/plasmacomponents3/ComboBox.qml

https://invent.kde.org/plasma/libplasma/-/commit/f37ea393ff97ec5b8ac66ed33028e5c7b7539659