Make context and dropdown menus scrollable (#15127)
This PR makes context and dropdown menus scrollable, so that they don't become totally unusable when they overflow the window. Release Notes: - N/A
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use gpui::{ClickEvent, CursorStyle, MouseButton, View};
|
||||
use gpui::{AnchorCorner, ClickEvent, CursorStyle, MouseButton, View};
|
||||
|
||||
use crate::{prelude::*, ContextMenu, PopoverMenu};
|
||||
|
||||
@@ -45,6 +45,7 @@ impl RenderOnce for DropdownMenu {
|
||||
.full_width(self.full_width)
|
||||
.menu(move |_cx| Some(self.menu.clone()))
|
||||
.trigger(DropdownMenuTrigger::new(self.label).full_width(self.full_width))
|
||||
.attach(AnchorCorner::BottomLeft)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user