From 597a4a6e146a3a3fb000137958c224d9cc0364d0 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Sun, 28 May 2023 09:52:45 -0600 Subject: [PATCH] GUI: Log window sizing --- resources/wx_gui/gui_sys_patch_start.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/resources/wx_gui/gui_sys_patch_start.py b/resources/wx_gui/gui_sys_patch_start.py index f92c87845..ffef152a9 100644 --- a/resources/wx_gui/gui_sys_patch_start.py +++ b/resources/wx_gui/gui_sys_patch_start.py @@ -44,6 +44,22 @@ class SysPatchStartFrame(wx.Frame): super(SysPatchStartFrame, self).__init__(parent, title=title, size=(350, 200), style=wx.DEFAULT_FRAME_STYLE & ~(wx.RESIZE_BORDER | wx.MAXIMIZE_BOX)) gui_support.GenerateMenubar(self, self.constants).generate() + + logging.info("Display Properties before CentreOnScreen() call:") + logging.info(f" Screen Size: {wx.DisplaySize()}") + logging.info(f" Screen Position: {wx.Display().GetGeometry().GetPosition()}") + logging.info(f" Frame Size: {self.GetSize()}") + logging.info(f" Frame Position: {self.GetPosition()}") + + self.CentreOnScreen() + + logging.info("Display Properties after CentreOnScreen() call:") + logging.info(f" Screen Size: {wx.DisplaySize()}") + logging.info(f" Screen Position: {wx.Display().GetGeometry().GetPosition()}") + logging.info(f" Frame Size: {self.GetSize()}") + logging.info(f" Frame Position: {self.GetPosition()}") + + if self.patches == {}: self.patches = sys_patch_detect.DetectRootPatch(self.constants.computer.real_model, self.constants).detect_patch_set() @@ -208,7 +224,6 @@ class SysPatchStartFrame(wx.Frame): dialog.SetSize((-1, return_button.GetPosition().y + return_button.GetSize().height + 33)) self.frame_modal = dialog dialog.ShowWindowModal() - self.Centre() def start_root_patching(self):