chore: dialog location (#602)

This commit is contained in:
hstyi
2025-05-28 13:16:42 +08:00
committed by GitHub
parent 9121eff8d8
commit 09d2f2d193
3 changed files with 5 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ class NewHostTreeDialog(
init()
setLocationRelativeTo(null)
setLocationRelativeTo(owner)
}

View File

@@ -400,10 +400,12 @@ class TerminalTabbed(
private fun showContextMenu(event: MouseEvent) {
val popupMenu = FlatPopupMenu()
popupMenu.add(I18n.getString("termora.toolbar.customize-toolbar")).addActionListener {
val owner = SwingUtilities.getWindowAncestor(this@TerminalTabbed)
val dialog = CustomizeToolBarDialog(
SwingUtilities.getWindowAncestor(this@TerminalTabbed),
owner,
termoraToolBar
)
dialog.setLocationRelativeTo(owner)
if (dialog.open()) {
termoraToolBar.rebuild()
}

View File

@@ -39,7 +39,7 @@ class MacroDialog(owner: Window) : DialogWrapper(owner) {
initEvents()
init()
setLocationRelativeTo(null)
setLocationRelativeTo(owner)
}
private fun initView() {