From 37cf129165916101ba665891d157c85ea9c37383 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 2 Aug 2017 10:23:13 -0400 Subject: The first loot! --- ShiftOS.Frontend/Desktop/WindowManager.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ShiftOS.Frontend/Desktop') diff --git a/ShiftOS.Frontend/Desktop/WindowManager.cs b/ShiftOS.Frontend/Desktop/WindowManager.cs index fbd42f4..23769bf 100644 --- a/ShiftOS.Frontend/Desktop/WindowManager.cs +++ b/ShiftOS.Frontend/Desktop/WindowManager.cs @@ -78,12 +78,19 @@ namespace ShiftOS.Frontend.Desktop public override void SetupDialog(IShiftOSWindow win) { var wb = new WindowBorder(); + var ctl = win as GUI.Control; + if (ctl.Width < 30) + ctl.Width = 30; + if (ctl.Height < 30) + ctl.Height = 30; wb.Width = (win as GUI.Control).Width + LoadedSkin.LeftBorderWidth + LoadedSkin.RightBorderWidth; wb.Height = (win as GUI.Control).Height + LoadedSkin.TitlebarHeight + LoadedSkin.BottomBorderWidth; wb.ParentWindow = win; wb.IsDialog = true; UIManager.AddTopLevel(wb); RunningBorders.Add(wb); + wb.X = (UIManager.Viewport.Width - wb.Width) / 2; + wb.Y = (UIManager.Viewport.Height - wb.Height) / 2; win.OnLoad(); win.OnUpgrade(); win.OnSkinLoad(); -- cgit v1.2.3