diff --git a/crates/project_panel/src/project_panel.rs b/crates/project_panel/src/project_panel.rs index f3506e2c94..d3d4856f4d 100644 --- a/crates/project_panel/src/project_panel.rs +++ b/crates/project_panel/src/project_panel.rs @@ -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) diff --git a/crates/theme/src/theme.rs b/crates/theme/src/theme.rs index 28e31ad3bb..c69a8d3898 100644 --- a/crates/theme/src/theme.rs +++ b/crates/theme/src/theme.rs @@ -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,