chore: fix menu anchoring to trigger bounds
This commit is contained in:
@@ -61,8 +61,8 @@ impl AppRoot {
|
||||
let app = cx.weak_entity();
|
||||
let panels = cx.new(|cx| PanelStack::new("signed-panel", cx));
|
||||
let titlebar = cx.new(|cx| TitlebarView::new(app.clone(), window, cx));
|
||||
|
||||
let empty = cx.new(|_| PlaceholderView::new("Select a repository"));
|
||||
|
||||
panels.update(cx, |panels, cx| {
|
||||
panels.set_empty(empty, None, cx);
|
||||
});
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use gpui::{
|
||||
Context, IntoElement, ParentElement as _, Render, SharedString, Styled as _, Window, div,
|
||||
};
|
||||
use gpui::{Context, IntoElement, ParentElement as _, Render, SharedString, Styled as _, Window};
|
||||
use ui::empty_state::EmptyState;
|
||||
use ui::layout::v_flex;
|
||||
|
||||
/// A tab that stands in for a screen that is not ported yet.
|
||||
pub struct PlaceholderView {
|
||||
@@ -18,6 +17,10 @@ impl PlaceholderView {
|
||||
|
||||
impl Render for PlaceholderView {
|
||||
fn render(&mut self, _window: &mut Window, _cx: &mut Context<Self>) -> impl IntoElement {
|
||||
div().size_full().child(EmptyState::new(self.title.clone()))
|
||||
v_flex()
|
||||
.size_full()
|
||||
.items_center()
|
||||
.justify_center()
|
||||
.child(EmptyState::new(self.title.clone()))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user