another high dpi fix which fixes some resizing issues.

This commit is contained in:
Benjamin Fischer 2022-03-13 01:54:13 +01:00 committed by RndName
parent 30fe1ca6af
commit 8422823921
No known key found for this signature in database
GPG Key ID: 5EF516FD9537F7C0

View File

@ -57,7 +57,10 @@ def inject_custom_payloads(user_path: Path) -> None:
def run_ui(game: Optional[Game]) -> None:
os.environ["QT_AUTO_SCREEN_SCALE_FACTOR"] = "1" # Potential fix for 4K screens
os.environ["QT_ENABLE_HIGHDPI_SCALING"] = "1" # Potential fix for 4K screens
QApplication.setHighDpiScaleFactorRoundingPolicy(
Qt.HighDpiScaleFactorRoundingPolicy.PassThrough
)
app = QApplication(sys.argv)
app.setAttribute(Qt.AA_DisableWindowContextHelpButton)