1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 14:41:39 +00:00

Add windows position handling at open, fix #653

- Move offscreen windows back on screen
- Restore maximized state without impacting resored size
- Fullscreen comes back on primary screen, needs further work to support
  restore on other screens
This commit is contained in:
2021-08-27 23:26:19 -05:00
parent 22996ee914
commit b0baa5bfd6
6 changed files with 55 additions and 9 deletions

View File

@@ -19,6 +19,7 @@ from PyQt5.QtWidgets import (
QAbstractItemView,
)
from qtlib.util import move_to_screen_center
from hscommon.trans import trget
from .problem_table import ProblemTable
@@ -70,3 +71,8 @@ class ProblemDialog(QDialog):
self.closeButton.setDefault(True)
self.horizontalLayout.addWidget(self.closeButton)
self.verticalLayout.addLayout(self.horizontalLayout)
def showEvent(self, event):
# have to do this here as the frameGeometry is not correct until shown
move_to_screen_center(self)
super().showEvent(event)