Commit cbdd941
authored
fix(toolbar): size the Project and Add Data menus to their content (#1914)
Both menus set a fixed `w-64` on DropdownMenuContent, so they rendered at
256px whatever they held. Add Data's longest label, "File Geodatabase
(GDB)", is 151px, leaving roughly 100px of dead space to the right of
every one of its 31 entries.
They were the only two toolbar menus doing this. View and Edit use a
`min-w-*` floor; Processing, Controls, Help and Plugins pass no width
class at all and shrink to fit over the primitive's own min-w-[8rem].
Dropping the class puts these two on that majority path.
Measured on the built app at 1440x900, unchanged in light and dark:
Project 256px -> 167px (longest label "Save as template...", 119px)
Add Data 256px -> 177px (longest label "File Geodatabase (GDB)", 151px)
Project keeps ~24px of slack for the chevrons on its three submenu rows.
Shrink-to-fit also means a locale with longer labels grows instead of
being pinned: Add Data measures 180px in German, 287px in Vietnamese and
182px in Arabic, with no horizontal overflow in any of them, still capped
by the primitive's max-w-[calc(100vw-1rem)].
ControlsMenu's two `w-64` submenus are left alone: they hold sliders,
which need a width to be usable.1 parent 579a725 commit cbdd941
2 files changed
Lines changed: 8 additions & 2 deletions
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
124 | 129 | | |
125 | 130 | | |
126 | 131 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
| 147 | + | |
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
| |||
0 commit comments