From 3632d002e7118f1802184dbe475ac546cbff97f8 Mon Sep 17 00:00:00 2001 From: ardocrat Date: Thu, 10 Aug 2023 23:07:17 +0300 Subject: [PATCH] ui: fix content height --- src/gui/views/root.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/gui/views/root.rs b/src/gui/views/root.rs index a92d74b..8f886e6 100644 --- a/src/gui/views/root.rs +++ b/src/gui/views/root.rs @@ -101,7 +101,12 @@ impl Root { ..Default::default() }) .show_animated_inside(ui, is_panel_open, |ui| { - self.network.ui(ui, frame, cb); + // Set content height as window height. + let mut rect = ui.available_rect_before_wrap(); + rect.set_height(frame.info().window_info.size.y); + ui.allocate_ui_at_rect(rect, |ui| { + self.network.ui(ui, frame, cb); + }); }); // Show wallets content. @@ -111,7 +116,12 @@ impl Root { ..Default::default() }) .show_inside(ui, |ui| { - self.wallets.ui(ui, frame, cb); + // Set content height as window height. + let mut rect = ui.available_rect_before_wrap(); + rect.set_height(frame.info().window_info.size.y); + ui.allocate_ui_at_rect(rect, |ui| { + self.wallets.ui(ui, frame, cb); + }); }); }