From 3e1af6e8cb1d707de0fe5634849178522d8fcf76 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 2 Jul 2017 08:49:10 -0400 Subject: [PATCH] fix windowmanager layout kink --- ShiftOS.WinForms/WindowBorder.cs | 5 +---- ShiftOS.WinForms/WinformsWindowManager.cs | 8 ++++++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ShiftOS.WinForms/WindowBorder.cs b/ShiftOS.WinForms/WindowBorder.cs index e056350..efb3f98 100644 --- a/ShiftOS.WinForms/WindowBorder.cs +++ b/ShiftOS.WinForms/WindowBorder.cs @@ -231,10 +231,7 @@ namespace ShiftOS.WinForms this.DoubleBuffered = true; this.Left = (Screen.PrimaryScreen.Bounds.Width - this.Width) / 2; this.Top = (Screen.PrimaryScreen.Bounds.Height - this.Height) / 2; - ParentWindow.OnLoad(); - ParentWindow.OnSkinLoad(); - ParentWindow.OnUpgrade(); - + } /// diff --git a/ShiftOS.WinForms/WinformsWindowManager.cs b/ShiftOS.WinForms/WinformsWindowManager.cs index 8bff387..a224f08 100644 --- a/ShiftOS.WinForms/WinformsWindowManager.cs +++ b/ShiftOS.WinForms/WinformsWindowManager.cs @@ -121,6 +121,10 @@ namespace ShiftOS.WinForms wb.IsDialog = true; Desktop.ShowWindow(wb); + form.OnLoad(); + form.OnSkinLoad(); + form.OnUpgrade(); + } public override void SetupWindow(IShiftOSWindow form) @@ -208,6 +212,10 @@ namespace ShiftOS.WinForms wb.FormClosed += onClose; Desktop.ShowWindow(wb); SetupWindows(); + form.OnLoad(); + form.OnSkinLoad(); + form.OnUpgrade(); + } public void SetupWindows()