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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user