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:
parent
8433428036
commit
c7390a400f
1 changed files with 3 additions and 0 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue