diff --git a/crates/ui/src/components/popover_menu.rs b/crates/ui/src/components/popover_menu.rs index 095b05793a..e3ce37b43e 100644 --- a/crates/ui/src/components/popover_menu.rs +++ b/crates/ui/src/components/popover_menu.rs @@ -178,6 +178,7 @@ impl PopoverMenu { self } + /// This method prevents the trigger button tooltip from being seen when the menu is open. pub fn trigger_with_tooltip( mut self, t: T, @@ -200,26 +201,26 @@ impl PopoverMenu { self } - /// anchor defines which corner of the menu to anchor to the attachment point - /// (by default the cursor position, but see attach) + /// Defines which corner of the menu to anchor to the attachment point. + /// By default, it uses the cursor position. Also see the `attach` method. pub fn anchor(mut self, anchor: Corner) -> Self { self.anchor = anchor; self } - /// attach defines which corner of the handle to attach the menu's anchor to + /// Defines which corner of the handle to attach the menu's anchor to. pub fn attach(mut self, attach: Corner) -> Self { self.attach = Some(attach); self } - /// offset offsets the position of the content by that many pixels. + /// Offsets the position of the content by that many pixels. pub fn offset(mut self, offset: Point) -> Self { self.offset = Some(offset); self } - /// attach something upon opening the menu + /// Attaches something upon opening the menu. pub fn on_open(mut self, on_open: Rc) -> Self { self.on_open = Some(on_open); self