fix: change log panel increase
Only reduce/increase log panel height when it is visible
This commit is contained in:
+2
-7
@@ -213,16 +213,11 @@ impl GuiState {
|
|||||||
}
|
}
|
||||||
/// Increase the height of the log panel, then rerender
|
/// Increase the height of the log panel, then rerender
|
||||||
pub fn log_height_increase(&mut self) {
|
pub fn log_height_increase(&mut self) {
|
||||||
if self.show_logs {
|
if self.show_logs && self.log_height <= 75 {
|
||||||
if self.log_height <= 75 {
|
|
||||||
self.log_height = self.log_height.saturating_add(5);
|
self.log_height = self.log_height.saturating_add(5);
|
||||||
}
|
|
||||||
} else {
|
|
||||||
self.log_height = 5;
|
|
||||||
}
|
|
||||||
self.show_logs = true;
|
|
||||||
self.rerender.update();
|
self.rerender.update();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Reduce the height of the logs panel, then rerender
|
/// Reduce the height of the logs panel, then rerender
|
||||||
/// Unselect logs panel if currently selected
|
/// Unselect logs panel if currently selected
|
||||||
|
|||||||
Reference in New Issue
Block a user