Constrain context menu to the width of the widest item

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2022-05-25 14:24:53 +02:00
parent f403d87eff
commit 3b2f1644fb
8 changed files with 200 additions and 93 deletions

View file

@ -32,21 +32,5 @@ export default function projectPanel(theme: Theme) {
text: text(theme, "mono", "primary", { size: "sm" }),
selection: player(theme, 1).selection,
},
contextMenu: {
width: 100,
// background: "#ff0000",
background: backgroundColor(theme, 300, "base"),
cornerRadius: 6,
padding: {
bottom: 2,
left: 6,
right: 6,
top: 2,
},
item: {
label: text(theme, "sans", "secondary", { size: "sm" }),
},
shadow: shadow(theme),
}
};
}