[window] increase default width of windows and resize areas

This commit is contained in:
Emil Ernerfeldt 2020-08-28 16:13:22 +02:00
parent 03bc4ea2e2
commit 0bbf7edaee
3 changed files with 5 additions and 7 deletions

View file

@ -37,7 +37,7 @@ impl Default for Resize {
id: None, id: None,
resizable: true, resizable: true,
min_size: Vec2::splat(16.0), min_size: Vec2::splat(16.0),
default_size: vec2(128.0, 128.0), // TODO: perferred size for a resizable area (e.g. a window or a text edit) default_size: vec2(320.0, 128.0), // TODO: preferred size of `Resize` area.
outline: true, outline: true,
} }
} }

View file

@ -40,7 +40,7 @@ impl<'open> Window<'open> {
resize: Resize::default() resize: Resize::default()
.outline(false) .outline(false)
.min_size([96.0, 32.0]) .min_size([96.0, 32.0])
.default_size([280.0, 400.0]), .default_size([420.0, 420.0]),
scroll: None, scroll: None,
collapsible: true, collapsible: true,
} }

View file

@ -139,11 +139,9 @@ impl DemoApp {
impl app::App for DemoApp { impl app::App for DemoApp {
fn ui(&mut self, ui: &mut Ui, backend: &mut dyn app::Backend) { fn ui(&mut self, ui: &mut Ui, backend: &mut dyn app::Backend) {
Window::new("Backend") Window::new("Backend").scroll(false).show(ui.ctx(), |ui| {
.default_width(500.0) self.backend_ui(ui, backend);
.show(ui.ctx(), |ui| { });
self.backend_ui(ui, backend);
});
let web_info = backend.web_info(); let web_info = backend.web_info();
let web_location_hash = web_info let web_location_hash = web_info