1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2026-03-08 09:47:48 +01:00

fix(main_app): center the application window on the screen

This commit is contained in:
2026-01-14 14:15:08 +01:00
committed by wyzula-jan
parent 7ccfcc9f52
commit 96a52a0cb0

View File

@@ -227,6 +227,12 @@ def main(): # pragma: no cover
height = int(width / (16 / 9))
w.resize(width, height)
# Center the window on the screen
x = screen_geometry.x() + (screen_geometry.width() - width) // 2
y = screen_geometry.y() + (screen_geometry.height() - height) // 2
w.move(x, y)
w.show()
sys.exit(app.exec())