Skip to content

egui::Area for egui::Modal precise size #5753

@itsNiccoloSabatini

Description

@itsNiccoloSabatini

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 😃

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions