emilk / emilk/egui

Opt-in to not store some selected state when using persistence

Open
#535 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
30.6k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
72

Description

```rust
egui::Window::new("code")
.open(&mut self.open)
.scroll(true)
.resizable(true)
.default_height(10.0)
.show(ctx, |ui| {
ui.label(
"This window is resizable and has a scroll area. You can shrink it to any size",
);
ui.separator();
ui.code(contents);
});
```

this is basically the same setup as [in the demo app](https://github.com/emilk/egui/blob/52e3663958cd8aa669c55ab077e5bf46dc0769db/egui_demo_lib/src/apps/demo/tests.rs#L354), but the window seems to follow only the size of its contents, expanding off screen for long texts. Am I missing something or did `Window::default_height` break in a recent patch?

Contributor guide

Open the contributing guide

Research direction

Reproduce the snippet and compare it with egui_demo_lib/src/apps/demo/tests.rs around the linked example. Then trace the Window sizing behavior, including default_height, and clarify whether persistence is involved. Done means the reported behavior is explained and the requested change or regression test is identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.