From c03300df29250045175c7427efe40c3f611514d9 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Mon, 22 Aug 2022 18:17:48 +0200 Subject: [PATCH] WIP: Start on `App::add_status_bar_item` Co-Authored-By: Nathan Sobo --- crates/gpui/src/app.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/crates/gpui/src/app.rs b/crates/gpui/src/app.rs index e9091d74c8001c59c03beb6c2e1f4101ae567035..9598540166e624a37a51a2318bd69cf7e8d300f4 100644 --- a/crates/gpui/src/app.rs +++ b/crates/gpui/src/app.rs @@ -1926,6 +1926,29 @@ impl MutableAppContext { }) } + // pub fn add_status_bar_item( + // &mut self, + // build_item: F1, + // build_menu: F2, + // menu_bounds: Vector2F, + // ) where + // I: View, + // M: View, + // F1: FnOnce(&mut ViewContext) -> I, + // F2: FnOnce(&mut ViewContext) -> M, + // { + // self.add_window( + // WindowOptions { + // bounds: menu_bounds, + // titlebar: None, + // title: None, + // titlebar_appears_transparent: true, + // traffic_light_position: (), + // }, + // build_root_view, + // ) + // } + pub fn replace_root_view(&mut self, window_id: usize, build_root_view: F) -> ViewHandle where T: View,