egui::Area for egui::Modal precise size
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 30.6k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 72
Description
The request
i think it would be great if egui::Area, used in egui::Modal to define the default area that the modal should occupy, had a way to define a fixed dimension. now I'm using this:
Modal::default_area(id)
.constrain(false)
.default_size(if app_state.reset_button_clicked {
UiSize::small_modal_vec_defaultsize()
} else {
UiSize::modal_vec_defaultsize()
}),
but like this if the bigger is used the graphic memory will save the dimension and is going to stay big, leaving a lot of white space.
What should be a good idea
I have no idea of how the Area works, but in my opinion it would be a great idea to implement a fixed size, so the modal will always adapt to that size and not grow bigger or stay bigger following the memory.
I hope I described it well, if not please ask question so i can clear out any doubt 😃
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the egui::Area and egui::Modal entry points, focusing on how default_size, constrain, and remembered dimensions interact. Done means providing a fixed-size option that lets the modal use its requested dimensions without retaining a larger previous size or leaving excess white space.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100