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

@@ -9,6 +9,7 @@
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QDockWidget, QWidget
from qtlib.util import move_to_screen_center
from .details_table import DetailsModel
from hscommon.plat import ISLINUX
@@ -73,3 +74,9 @@ class DetailsDialog(QDockWidget):
def refresh(self):
self.tableModel.beginResetModel()
self.tableModel.endResetModel()
def showEvent(self, event):
if self._wasDocked is False:
# have to do this here as the frameGeometry is not correct until shown
move_to_screen_center(self)
super().showEvent(event)