From f79e41a58a3f0af4ffe9f0025879986a5e5f167d Mon Sep 17 00:00:00 2001 From: Jack Wills <32690432+mrjackwills@users.noreply.github.com> Date: Tue, 17 Jun 2025 19:32:18 +0000 Subject: [PATCH] fix: change log panel increase Only reduce/increase log panel height when it is visible --- src/ui/gui_state.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/ui/gui_state.rs b/src/ui/gui_state.rs index 1ba83c9..0d9cec6 100644 --- a/src/ui/gui_state.rs +++ b/src/ui/gui_state.rs @@ -213,15 +213,10 @@ impl GuiState { } /// Increase the height of the log panel, then rerender pub fn log_height_increase(&mut self) { - if self.show_logs { - if self.log_height <= 75 { - self.log_height = self.log_height.saturating_add(5); - } - } else { - self.log_height = 5; + if self.show_logs && self.log_height <= 75 { + self.log_height = self.log_height.saturating_add(5); + self.rerender.update(); } - self.show_logs = true; - self.rerender.update(); } /// Reduce the height of the logs panel, then rerender