Core review corrections

This commit is contained in:
UnicornFreedom 2025-09-03 11:39:43 +02:00
parent 667a74519a
commit 6a252d86fd
No known key found for this signature in database
GPG Key ID: B4ED0DB6B940024F
2 changed files with 3 additions and 1 deletions

View File

@ -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()
}

View File

@ -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)