[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

@@ -9,6 +9,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Fixes ### Fixes
- Arch - Arch
- not properly checking all provided packages by the system when checking for conflicts (upgrade requirements) - not properly checking all provided packages by the system when checking for conflicts (upgrade requirements)
- UI
- some windows not properly being centralized (regression introduced in **0.10.4**)
- some windows being displayed in the wrong place (regression introduced in **0.10.4**)
### Improvements ### Improvements
- Arch - Arch

View File

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