From 923afb7e99464c5a235d5b6352f8a7594b536fcf Mon Sep 17 00:00:00 2001 From: hstyi Date: Fri, 10 Jan 2025 15:08:01 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BC=B9=E7=AA=97=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E4=BB=A5=E7=88=B6=E7=AA=97=E5=8F=A3=E4=B8=BA=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=20(#55)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/kotlin/app/termora/TermoraFrame.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/app/termora/TermoraFrame.kt b/src/main/kotlin/app/termora/TermoraFrame.kt index 4a7a136..cfea4dc 100644 --- a/src/main/kotlin/app/termora/TermoraFrame.kt +++ b/src/main/kotlin/app/termora/TermoraFrame.kt @@ -68,6 +68,7 @@ class TermoraFrame : JFrame() { FlatDesktop.setPreferencesHandler(that) } }) + dialog.setLocationRelativeTo(owner) dialog.isVisible = true } } @@ -222,7 +223,9 @@ class TermoraFrame : JFrame() { val focusWindow = KeyboardFocusManager.getCurrentKeyboardFocusManager().focusedWindow val frame = this@TermoraFrame if (focusWindow == frame) { - FindEverywhere(frame).isVisible = true + val dialog = FindEverywhere(frame) + dialog.setLocationRelativeTo(frame) + dialog.isVisible = true } } }