Update to PySide6.

It sounds like PySide2 will not be moving to Python 3.11, so we're stuck
on 3.10 without this. Upgrading to a newer Qt also fixes some high DPI
bugs (the file browser dialog for save/load is no longer tiny on 4k).

https://github.com/pyinstaller/pyinstaller/issues/5414 previously
blocked this, but the bug appears to be fixed now.
This commit is contained in:
Dan Albert
2022-12-29 15:15:16 -08:00
parent e0c13846a7
commit 306971230b
96 changed files with 184 additions and 196 deletions

View File

@@ -3,13 +3,10 @@ import traceback
import webbrowser
from typing import Optional
from PySide2.QtCore import QSettings, Qt, Signal
from PySide2.QtGui import QCloseEvent, QIcon
from PySide2.QtWidgets import (
QAction,
QActionGroup,
from PySide6.QtCore import QSettings, Qt, Signal
from PySide6.QtGui import QAction, QActionGroup, QCloseEvent, QGuiApplication, QIcon
from PySide6.QtWidgets import (
QApplication,
QDesktopWidget,
QFileDialog,
QMainWindow,
QMessageBox,
@@ -97,7 +94,7 @@ class QLiberationWindow(QMainWindow):
# Default to maximized on the main display if we don't have any persistent
# configuration.
screen = QDesktopWidget().screenGeometry()
screen = QGuiApplication.primaryScreen().availableSize()
self.setGeometry(0, 0, screen.width(), screen.height())
self.setWindowState(Qt.WindowMaximized)
@@ -133,7 +130,7 @@ class QLiberationWindow(QMainWindow):
vbox.setSizes([600, 100])
vbox = QVBoxLayout()
vbox.setMargin(0)
vbox.setContentsMargins(0, 0, 0, 0)
vbox.addWidget(QTopPanel(self.game_model, self.sim_controller, ui_flags))
vbox.addWidget(hbox)