fix: change log panel increase

Only reduce/increase log panel height when it is visible
This commit is contained in:
Jack Wills
2025-06-17 19:32:18 +00:00
parent 67e5888e00
commit f79e41a58a
+3 -8
View File
@@ -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