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

@@ -32,7 +32,7 @@ from PyQt5.QtGui import QPixmap, QIcon
from hscommon.trans import trget
from hscommon.plat import ISLINUX
from qtlib.util import horizontal_wrap
from qtlib.util import horizontal_wrap, move_to_screen_center
from qtlib.preferences import get_langnames
from enum import Flag, auto
@@ -369,6 +369,11 @@ use the modifier key to drag the floating window around"
section_to_update = Sections.DISPLAY
self.resetToDefaults(section_to_update)
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)
class ColorPickerButton(QPushButton):
def __init__(self, parent):