mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-11 21:13:02 +00:00
Break context menu items out in theme
This commit is contained in:
parent
6b96822c1a
commit
b428d0de38
2 changed files with 10 additions and 4 deletions
|
@ -890,11 +890,11 @@ impl ProjectPanel {
|
|||
|
||||
Overlay::new(
|
||||
Flex::column()
|
||||
.with_child(Label::new("Add File".to_string(), style.label.clone()).boxed())
|
||||
.with_child(
|
||||
Label::new("Add File".to_string(), style.item.label.clone()).boxed(),
|
||||
)
|
||||
.contained()
|
||||
.with_style(style.container)
|
||||
// .constrained()
|
||||
// .with_width(style.width)
|
||||
.boxed(),
|
||||
)
|
||||
.with_abs_position(menu.position)
|
||||
|
|
|
@ -242,7 +242,13 @@ pub struct ProjectPanelEntry {
|
|||
|
||||
#[derive(Clone, Debug, Deserialize, Default)]
|
||||
pub struct ContextMenu {
|
||||
pub width: f32,
|
||||
#[serde(flatten)]
|
||||
pub container: ContainerStyle,
|
||||
pub item: ContextMenuItem,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Default)]
|
||||
pub struct ContextMenuItem {
|
||||
#[serde(flatten)]
|
||||
pub container: ContainerStyle,
|
||||
pub label: TextStyle,
|
||||
|
|
Loading…
Reference in a new issue