Skip to content

Commit

Permalink
More window geometry improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
kz26 committed May 20, 2017
1 parent e9e47fb commit 782441d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions dottorrentGUI/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ class DottorrentGUI(Ui_MainWindow):

def setupUi(self, MainWindow):
super().setupUi(MainWindow)
MainWindow.resize(500, 0)
MainWindow.setWindowTitle(PROGRAM_NAME_VERSION)

self.torrent = None
self.MainWindow = MainWindow
Expand Down Expand Up @@ -534,6 +532,18 @@ def main():
MainWindow = QtWidgets.QMainWindow()
ui = DottorrentGUI()
ui.setupUi(MainWindow)

MainWindow.resize(500, 0)
MainWindow.setGeometry(
QtWidgets.QStyle.alignedRect(
QtCore.Qt.LeftToRight,
QtCore.Qt.AlignCenter,
MainWindow.size(),
app.desktop().availableGeometry()
)
)
MainWindow.setWindowTitle(PROGRAM_NAME_VERSION)

ui.loadSettings()
ui.clipboard = app.clipboard
app.aboutToQuit.connect(lambda: ui.saveSettings())
Expand Down

0 comments on commit 782441d

Please sign in to comment.