From 84228239211a62caaef63aca10f85fc98776845f Mon Sep 17 00:00:00 2001 From: Benjamin Fischer Date: Sun, 13 Mar 2022 01:54:13 +0100 Subject: [PATCH] another high dpi fix which fixes some resizing issues. --- qt_ui/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt_ui/main.py b/qt_ui/main.py index 25985654..f8ada488 100644 --- a/qt_ui/main.py +++ b/qt_ui/main.py @@ -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)