Clean up left side titlebar buttons

This commit is contained in:
Nate Butler 2023-11-30 13:11:20 -05:00
parent 679851e349
commit 5eb89781e3
2 changed files with 63 additions and 76 deletions

View file

@ -1,4 +1,4 @@
use gpui::{div, overlay, AnyElement, Div, ParentElement, RenderOnce, Styled, WindowContext};
use gpui::{div, overlay, px, AnyElement, Div, ParentElement, RenderOnce, Styled, WindowContext};
use smallvec::SmallVec;
use crate::{prelude::*, Popover};
@ -16,9 +16,18 @@ impl RenderOnce for PopoverMenu {
fn render(self, _cx: &mut WindowContext) -> Self::Rendered {
div()
.bg(gpui::green())
.relative()
.child(self.trigger)
.child(overlay().child(Popover::new().children(self.children)))
.child(div().bg(gpui::blue()).child(self.trigger))
.child(
overlay()
.position(gpui::Point {
x: px(100.),
y: px(100.),
})
.anchor(gpui::AnchorCorner::TopRight)
.child(Popover::new().children(self.children)),
)
}
}