From 21862e802164813752393d6416caca2dcf5e6028 Mon Sep 17 00:00:00 2001 From: wakonig_k Date: Wed, 14 Jan 2026 14:15:08 +0100 Subject: [PATCH] fix(main_app): center the application window on the screen --- bec_widgets/applications/main_app.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bec_widgets/applications/main_app.py b/bec_widgets/applications/main_app.py index ef5aeae9..1157e32b 100644 --- a/bec_widgets/applications/main_app.py +++ b/bec_widgets/applications/main_app.py @@ -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())