Browse Source

[window] increase default width of windows and resize areas

pull/20/head
Emil Ernerfeldt 4 years ago
parent
commit
0bbf7edaee
  1. 2
      egui/src/containers/resize.rs
  2. 2
      egui/src/containers/window.rs
  3. 8
      egui/src/demos/app.rs

2
egui/src/containers/resize.rs

@ -37,7 +37,7 @@ impl Default for Resize {
id: None,
resizable: true,
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,
}
}

2
egui/src/containers/window.rs

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

8
egui/src/demos/app.rs

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

Loading…
Cancel
Save