Unified · Split
| @@ -108,6 +108,7 @@ impl<M: ManagedView> PopoverMenu<M> { · 107 unmodified lines | |||
| 108 | } | 108 | } |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | /// Creates a [PopoverMenu] | ||
| 111 | pub fn popover_menu<M: ManagedView>(id: impl Into<ElementId>) -> PopoverMenu<M> { | 112 | pub fn popover_menu<M: ManagedView>(id: impl Into<ElementId>) -> PopoverMenu<M> { |
| 112 | PopoverMenu { | 113 | PopoverMenu { |
| 113 | id: id.into(), | 114 | id: id.into(), |
| @@ -39,6 +39,7 @@ impl<M: ManagedView> RightClickMenu<M> { · 38 unmodified lines | |||
| 39 | } | 39 | } |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | /// Creates a [RightClickMenu] | ||
| 42 | pub fn right_click_menu<M: ManagedView>(id: impl Into<ElementId>) -> RightClickMenu<M> { | 43 | pub fn right_click_menu<M: ManagedView>(id: impl Into<ElementId>) -> RightClickMenu<M> { |
| 43 | RightClickMenu { | 44 | RightClickMenu { |
| 44 | id: id.into(), | 45 | id: id.into(), |
| @@ -2,17 +2,13 @@ use gpui::{div, Div}; · 1 unmodified line | |||
| 2 | 2 | ||
| 3 | use crate::StyledExt; | 3 | use crate::StyledExt; |
| 4 | 4 | ||
| 5 | /// Horizontally stacks elements. | 5 | /// Horizontally stacks elements. Sets `flex()`, `flex_row()`, `items_center()` |
| 6 | /// | ||
| 7 | /// Sets `flex()`, `flex_row()`, `items_center()` | ||
| 8 | #[track_caller] | 6 | #[track_caller] |
| 9 | pub fn h_stack() -> Div { | 7 | pub fn h_stack() -> Div { |
| 10 | div().h_flex() | 8 | div().h_flex() |
| 11 | } | 9 | } |
| 12 | 10 | ||
| 13 | /// Vertically stacks elements. | 11 | /// Vertically stacks elements. Sets `flex()`, `flex_col()` |
| 14 | /// | ||
| 15 | /// Sets `flex()`, `flex_col()` | ||
| 16 | #[track_caller] | 12 | #[track_caller] |
| 17 | pub fn v_stack() -> Div { | 13 | pub fn v_stack() -> Div { |
| 18 | div().v_flex() | 14 | div().v_flex() |