1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

PopupMenu: Make header item components disabled, making them non-interactive using screen readers

This makes screen readers report header items as "dimmed" and offering
no action, similarly to native MacOS menu header items.
This commit is contained in:
attila 2025-07-04 17:46:39 +02:00 committed by Attila Szarvas
parent 8433428036
commit c7390a400f

View file

@ -126,7 +126,10 @@ struct ItemComponent final : public Component
: item (i), parentWindow (parent), options (o), customComp (i.customComponent)
{
if (item.isSectionHeader)
{
customComp = *new HeaderItemComponent (item.text, options);
setEnabled (false);
}
if (customComp != nullptr)
{