From 22a13c75bbebbd8ee21248bb540f3775982eee19 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sun, 15 Aug 2021 17:04:14 +0200 Subject: [PATCH] Add Ui::available_height Closes #553 --- egui/src/ui.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/egui/src/ui.rs b/egui/src/ui.rs index c01b4207b..7306c48b9 100644 --- a/egui/src/ui.rs +++ b/egui/src/ui.rs @@ -470,6 +470,10 @@ impl Ui { self.available_size().x } + pub fn available_height(&self) -> f32 { + self.available_size().y + } + /// In case of a wrapping layout, how much space is left on this row/column? pub fn available_size_before_wrap(&self) -> Vec2 { self.placer.available_rect_before_wrap().size()