wip: refactor
This commit is contained in:
@@ -305,23 +305,30 @@ async fn main() {
|
||||
let bounds = Bounds::centered(None, size(px(900.0), px(680.0)), cx);
|
||||
|
||||
let opts = WindowOptions {
|
||||
window_bounds: Some(WindowBounds::Windowed(bounds)),
|
||||
window_decorations: Some(WindowDecorations::Client),
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
titlebar: Some(TitlebarOptions {
|
||||
title: Some(SharedString::new_static(APP_NAME)),
|
||||
traffic_light_position: Some(point(px(9.0), px(9.0))),
|
||||
appears_transparent: true,
|
||||
}),
|
||||
window_bounds: Some(WindowBounds::Windowed(bounds)),
|
||||
window_decorations: Some(WindowDecorations::Client),
|
||||
#[cfg(target_os = "linux")]
|
||||
window_background: WindowBackgroundAppearance::Transparent,
|
||||
#[cfg(target_os = "linux")]
|
||||
window_decorations: Some(WindowDecorations::Client),
|
||||
kind: WindowKind::Normal,
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
cx.open_window(opts, |cx| {
|
||||
let app_view = cx.new_view(AppView::new);
|
||||
|
||||
cx.set_window_title("Coop");
|
||||
cx.activate(true);
|
||||
cx.new_view(|cx| Root::new(app_view.into(), cx))
|
||||
})
|
||||
.unwrap();
|
||||
.expect("System error");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user