Skip to content

Commit 4e24305

Browse files
committed
fix: cast coordinates to int when moving window
1 parent 2efe66d commit 4e24305

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/ui/run_ui.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ def __init__(self):
3939
def center_screen(self):
4040
size = self.size()
4141
desktopSize = QtWidgets.QDesktopWidget().screenGeometry()
42-
top = (desktopSize.height() / 2) - (size.height() / 2)
43-
left = (desktopSize.width() / 2) - (size.width() / 2)
42+
top = int((desktopSize.height() / 2) - (size.height() / 2))
43+
left = int((desktopSize.width() / 2) - (size.width() / 2))
4444
self.move(left, top)
4545

4646
def closeEvent(self, event):

src/ui/splash.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ def __init__(self):
1414
def center_screen(self):
1515
size = self.size()
1616
desktopSize = QtWidgets.QDesktopWidget().screenGeometry()
17-
top = (desktopSize.height() / 2) - (size.height() / 2)
18-
left = (desktopSize.width() / 2) - (size.width() / 2)
17+
top = int((desktopSize.height() / 2) - (size.height() / 2))
18+
left = int((desktopSize.width() / 2) - (size.width() / 2))
1919
self.move(left, top)
2020

2121
def btn_close_clicked(self):

0 commit comments

Comments
 (0)