diff --git a/src/main/scala/ocelot/desktop/ui/widget/LogWidget.scala b/src/main/scala/ocelot/desktop/ui/widget/LogWidget.scala index fb7d637..c4f3c90 100644 --- a/src/main/scala/ocelot/desktop/ui/widget/LogWidget.scala +++ b/src/main/scala/ocelot/desktop/ui/widget/LogWidget.scala @@ -74,6 +74,8 @@ abstract class LogWidget extends Widget { entries.dropInPlace(count) } + // this is a fix for log widget not scaling down after being cleaned + // TODO: implement it nicely size = minimumSize parent.get.recalculateBoundsAndRelayout() } diff --git a/src/main/scala/ocelot/desktop/windows/OcelotInterfaceWindow.scala b/src/main/scala/ocelot/desktop/windows/OcelotInterfaceWindow.scala index acdc290..5aa19f1 100644 --- a/src/main/scala/ocelot/desktop/windows/OcelotInterfaceWindow.scala +++ b/src/main/scala/ocelot/desktop/windows/OcelotInterfaceWindow.scala @@ -30,7 +30,7 @@ class OcelotInterfaceWindow(storage: OcelotInterfaceLogStorage) extends PanelWin children :+= new TextInput() { eventHandlers += { - case event @ KeyEvent(KeyEvent.State.Press | KeyEvent.State.Repeat, Keyboard.KEY_UP | Keyboard.KEY_DOWN, _) if this.isFocused => + case event @ KeyEvent(KeyEvent.State.Press | KeyEvent.State.Repeat, Keyboard.KEY_UP | Keyboard.KEY_DOWN, _) if isFocused => val currentInput = text val index = if (event.code == Keyboard.KEY_UP) { storage.findLastTextEntry(currentInput, storage.entryCount - historyPosition)