Button Style Glass Prominent Ignored on Menu When Used Inside ToolbarItem

When a Menu is placed inside a ToolbarItem, applying buttonStyle(.glassProminent) has no visible effect.

The same modifier works correctly when a Button is used instead of a Menu inside the ToolbarItem. In that case, the button is rendered with the accent-colored background as expected.

This suggests that Menu does not respect the .glassProminent button style when embedded in a ToolbarItem, even though other button types do.

Code Example

// Button with accent background color
.toolbar {
    ToolbarItem(placement: .primaryAction) {
        Button(action: {})
            .buttonStyle(.glassProminent)
    }
}

// Menu with internal button with no accent background color
.toolbar {
    ToolbarItem(placement: .primaryAction) {
        Menu(...) {
            ...
        }.buttonStyle(.glassProminent)
    }
}

Hello danilopeixoto,

Thanks for your code snippet of the issue. Can you please provide screenshots, or even a focused sample app that reproduces this issue? If so, please share a link to your test project. That'll help us better understand what's going on. If you're not familiar with preparing a test project, take a look at Creating a test project.

Thank you for your patience,

Richard Yeh  Developer Technical Support

Button Style Glass Prominent Ignored on Menu When Used Inside ToolbarItem
 
 
Q