Open new windows with a default size and position (#9204)
This PR changes GPUI to open windows with a default size and location, and to otherwise inherit from their spawning window. Note: The linux build now crashes on startup. Release Notes: - N/A --------- Co-authored-by: Nathan <nathan@zed.dev> Co-authored-by: Ezekiel Warren <zaucy@users.noreply.github.com>
This commit is contained in:
parent
9a2dceeea1
commit
e792c1a5c5
30 changed files with 443 additions and 347 deletions
|
@ -7,8 +7,7 @@ mod story_selector;
|
|||
use clap::Parser;
|
||||
use dialoguer::FuzzySelect;
|
||||
use gpui::{
|
||||
div, px, size, AnyView, AppContext, Bounds, Render, ViewContext, VisualContext, WindowBounds,
|
||||
WindowOptions,
|
||||
div, px, size, AnyView, AppContext, Bounds, Render, ViewContext, VisualContext, WindowOptions,
|
||||
};
|
||||
use log::LevelFilter;
|
||||
use settings::{default_settings, KeymapFile, Settings, SettingsStore};
|
||||
|
@ -85,12 +84,11 @@ fn main() {
|
|||
load_storybook_keymap(cx);
|
||||
cx.set_menus(app_menus());
|
||||
|
||||
let size = size(px(1500.), px(780.));
|
||||
let bounds = Bounds::centered(size, cx);
|
||||
let _window = cx.open_window(
|
||||
WindowOptions {
|
||||
bounds: WindowBounds::Fixed(Bounds {
|
||||
origin: Default::default(),
|
||||
size: size(px(1500.), px(780.)).into(),
|
||||
}),
|
||||
bounds: Some(bounds),
|
||||
..Default::default()
|
||||
},
|
||||
move |cx| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue