[view] fix: windows positioning regressions

This commit is contained in:
Vinicius Moreira
2022-11-25 07:36:00 -03:00
parent 93d2d66b71
commit 65705af2e1
2 changed files with 6 additions and 2 deletions

View File

@@ -10,9 +10,10 @@ desktop: Optional[QDesktopWidget] = None
def centralize(widget: QWidget):
widget_frame = widget.frameGeometry()
screen_geometry = get_current_screen_geometry()
widget.frameGeometry().moveCenter(screen_geometry.center())
widget.move(widget.frameGeometry().topLeft())
widget_frame.moveCenter(screen_geometry.center())
widget.move(widget_frame.topLeft())
def load_icon(path: str, width: int, height: int = None) -> QIcon: