Window.fixed_size() et al. do not work
- Dominant language
- Rust
- Stars
- 30.6k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 72
Description
Using the `fixed_size()` method on a window makes it non-resizable, but the size of the window always conforms to the contents. The size passed to the method is completely ignored.
I did some digging and discovered that the issue is in the following condition: https://github.com/emilk/egui/blob/60fd70921df538c5cfab9918ddac1a2df5a06c66/egui/src/containers/resize.rs#L266-L277
Because the window is not resizable, it will not be given the requested size.
Unconditionally using the first branch seems to fix it, but I do not know what else might break.
Contributor guide
Research direction
Start with the condition in egui/src/containers/resize.rs at lines 266-277, then trace how Window.fixed_size() and related methods use it. Reproduce the reported behavior with a non-resizable window and check whether changing the branch affects other resize behavior. Done means the requested fixed size is honored without breaking existing window sizing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100