Add icon-only dropdown menu triggers

- Infer a square icon-only trigger when no label is set.
- Omit the chevron and horizontal padding in that mode.
- Demonstrate it with the gallery's More menu.
- Assert the icon-only trigger renders at 32x32.
This commit is contained in:
2026-11-16 19:23:24 +07:00
parent 21faea00c5
commit 51a23aa526
3 changed files with 36 additions and 9 deletions
+2 -1
View File
@@ -3104,7 +3104,8 @@ impl Render for DropdownMenuDemo {
});
let more = DropdownMenu::new("dropdown-demo-more")
.label("More")
.icon(IconRole::More)
.accessibility_label("More actions")
.variant(ButtonVariant::Ghost)
.open(self.open_menu == Some(DemoDropdown::More))
.on_open_change({