From 20f1e24439f0fa310695c5c9362fbbe596fcb477 Mon Sep 17 00:00:00 2001 From: Mezone <20496112+Mez0ne@users.noreply.github.com> Date: Sun, 1 Dec 2024 00:47:05 +0800 Subject: [PATCH] fix bug in opgg_window QRect requires int type, not float. --- app/view/opgg_window.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/view/opgg_window.py b/app/view/opgg_window.py index 5eff4f6..d7443ff 100644 --- a/app/view/opgg_window.py +++ b/app/view/opgg_window.py @@ -501,7 +501,7 @@ def showEvent(self, a0: QShowEvent) -> None: dpi = self.devicePixelRatioF() x = pos.right() y = pos.center().y() - size.height() * dpi / 2 - rect = QRect(x / dpi, y / dpi, size.width(), size.height()) + rect = QRect(x // dpi, y // dpi, size.width(), size.height()) # 如果超出右边界,则直接 return 了 screenWidth = win32api.GetSystemMetrics(0)