Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
popover_menu: Add docs to the `trigger_with_tooltip` method (#25158)
Danilo Leal044be720380d
diff --git a/crates/ui/src/components/popover_menu.rs b/crates/ui/src/components/popover_menu.rsindex 095b05793a7..e3ce37b43e0 100644--- a/crates/ui/src/components/popover_menu.rs+++ b/crates/ui/src/components/popover_menu.rs@@ -178,6 +178,7 @@ impl<M: ManagedView> PopoverMenu<M> {self}+ /// This method prevents the trigger button tooltip from being seen when the menu is open.pub fn trigger_with_tooltip<T: PopoverTrigger + ButtonCommon>(mut self,t: T,@@ -200,26 +201,26 @@ impl<M: ManagedView> PopoverMenu<M> {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<Pixels>) -> 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<dyn Fn(&mut Window, &mut App)>) -> Self {self.on_open = Some(on_open);self