1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 06:40:06 -04:00

Better auto-sizing of windows

This commit is contained in:
Emil Ernerfeldt
2020-05-10 19:00:48 +02:00
parent 274acff47e
commit 9dab3628a1
2 changed files with 21 additions and 5 deletions

View File

@@ -74,8 +74,10 @@ impl Resize {
self
}
/// Not resizable, just takes the size of its contents.
pub fn auto_sized(self) -> Self {
self.resizable(false)
self.default_size(Vec2::splat(f32::INFINITY))
.resizable(false)
.auto_shrink_width(true)
.auto_expand_width(true)
.auto_shrink_height(true)