mirror of
https://github.com/TermoraDev/termora.git
synced 2026-01-16 02:12:58 +08:00
fix: dialog edge detection (#240)
This commit is contained in:
@@ -58,9 +58,8 @@ class FileSystemTabbed(
|
||||
private fun initEvents() {
|
||||
addBtn.addActionListener {
|
||||
val dialog = HostTreeDialog(SwingUtilities.getWindowAncestor(this))
|
||||
|
||||
dialog.location = Point(
|
||||
addBtn.locationOnScreen.x - dialog.width / 2 + addBtn.width / 2,
|
||||
max(0, addBtn.locationOnScreen.x - dialog.width / 2 + addBtn.width / 2),
|
||||
addBtn.locationOnScreen.y + max(tabHeight, addBtn.height)
|
||||
)
|
||||
dialog.isVisible = true
|
||||
|
||||
Reference in New Issue
Block a user