mirror of
https://github.com/emilk/egui.git
synced 2026-09-03 23:30:04 -04:00
Constrain demo windows to the space left after the panels (#7785)
This commit is contained in:
@@ -8,14 +8,15 @@ impl crate::Demo for About {
|
||||
"About egui"
|
||||
}
|
||||
|
||||
fn show(&mut self, ctx: &egui::Context, open: &mut bool) {
|
||||
fn show(&mut self, ui: &mut egui::Ui, open: &mut bool) {
|
||||
egui::Window::new(self.name())
|
||||
.default_width(320.0)
|
||||
.default_height(480.0)
|
||||
.open(open)
|
||||
.resizable([true, false])
|
||||
.scroll(false)
|
||||
.show(ctx, |ui| {
|
||||
.constrain_to(ui.available_rect_before_wrap())
|
||||
.show(ui, |ui| {
|
||||
use crate::View as _;
|
||||
self.ui(ui);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user