diff --git a/ShiftOS.WinForms/WindowBorder.cs b/ShiftOS.WinForms/WindowBorder.cs index 0308f8a..4fba470 100644 --- a/ShiftOS.WinForms/WindowBorder.cs +++ b/ShiftOS.WinForms/WindowBorder.cs @@ -124,7 +124,6 @@ namespace ShiftOS.WinForms } }; - this.Width = LoadedSkin.LeftBorderWidth + _parentWindow.Width + LoadedSkin.RightBorderWidth; this.Height = LoadedSkin.TitlebarHeight + _parentWindow.Height + LoadedSkin.BottomBorderWidth; @@ -133,6 +132,13 @@ namespace ShiftOS.WinForms this._parentWindow.Show(); ControlManager.SetupControls(this._parentWindow); + ParentWindow.OnSkinLoad(); + ParentWindow.OnUpgrade(); + Shiftorium.Installed += () => + { + Setup(); + ParentWindow.OnUpgrade(); + }; Desktop.ShowWindow(this); diff --git a/ShiftOS.WinForms/WinformsWindowManager.cs b/ShiftOS.WinForms/WinformsWindowManager.cs index 40177be..494c572 100644 --- a/ShiftOS.WinForms/WinformsWindowManager.cs +++ b/ShiftOS.WinForms/WinformsWindowManager.cs @@ -197,6 +197,13 @@ namespace ShiftOS.WinForms var wb = new WindowBorder(form as UserControl); + FormClosedEventHandler onClose = (o,a)=> { }; + onClose = (o, a) => + { + SetupWindows(); + wb.FormClosed -= onClose; + }; + wb.FormClosed += onClose; SetupWindows(); }