Add the ability to hide the titlebar when creating windows

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2022-08-22 18:17:14 +02:00
parent ca618b02b6
commit 21c91a29e7
3 changed files with 41 additions and 20 deletions

View file

@ -20,7 +20,7 @@ use gpui::{
geometry::vector::vec2f,
impl_actions,
platform::{WindowBounds, WindowOptions},
AssetSource, AsyncAppContext, ViewContext,
AssetSource, AsyncAppContext, TitlebarOptions, ViewContext,
};
use language::Rope;
pub use lsp;
@ -330,9 +330,11 @@ pub fn initialize_workspace(
pub fn build_window_options() -> WindowOptions<'static> {
WindowOptions {
bounds: WindowBounds::Maximized,
title: None,
titlebar_appears_transparent: true,
traffic_light_position: Some(vec2f(8., 8.)),
titlebar: Some(TitlebarOptions {
title: None,
appears_transparent: true,
traffic_light_position: Some(vec2f(8., 8.)),
}),
}
}