mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
Fixed a glitch with initial window position (they'd sometimes end up in awkward places on the screen).
This commit is contained in:
parent
e0adec7b2b
commit
b8980b4667
@ -13,6 +13,7 @@ from PyQt4.QtGui import (QWidget, QFileDialog, QHeaderView, QVBoxLayout, QHBoxLa
|
||||
|
||||
from hscommon.trans import tr, trmsg
|
||||
from qtlib.recent import Recent
|
||||
from qtlib.util import moveToScreenCenter
|
||||
from core.app import NoScannableFileError
|
||||
|
||||
from . import platform
|
||||
@ -144,6 +145,8 @@ class DirectoriesDialog(QMainWindow):
|
||||
|
||||
if self.app.prefs.directoriesWindowRect is not None:
|
||||
self.setGeometry(self.app.prefs.directoriesWindowRect)
|
||||
else:
|
||||
moveToScreenCenter(self)
|
||||
|
||||
def _updateAddButton(self):
|
||||
if self.recentFolders.isEmpty():
|
||||
|
@ -15,6 +15,7 @@ from PyQt4.QtGui import (QMainWindow, QMenu, QLabel, QHeaderView, QMessageBox, Q
|
||||
|
||||
from hscommon.trans import tr, trmsg
|
||||
from hscommon.util import nonone
|
||||
from qtlib.util import moveToScreenCenter
|
||||
|
||||
from .results_model import ResultsModel, ResultsView
|
||||
from .stats_label import StatsLabel
|
||||
@ -192,8 +193,11 @@ class ResultWindow(QMainWindow):
|
||||
|
||||
if self.app.prefs.resultWindowIsMaximized:
|
||||
self.setWindowState(self.windowState() | Qt.WindowMaximized)
|
||||
if self.app.prefs.resultWindowRect is not None and not self.app.prefs.resultWindowIsMaximized:
|
||||
self.setGeometry(self.app.prefs.resultWindowRect)
|
||||
else:
|
||||
if self.app.prefs.resultWindowRect is not None:
|
||||
self.setGeometry(self.app.prefs.resultWindowRect)
|
||||
else:
|
||||
moveToScreenCenter(self)
|
||||
|
||||
#--- Private
|
||||
def _load_columns(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user