diff options
| author | Michael <[email protected]> | 2017-08-02 10:23:13 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-08-02 10:23:13 -0400 |
| commit | 37cf129165916101ba665891d157c85ea9c37383 (patch) | |
| tree | bc184d6be19bdf1258faba51a1323bfeec676502 /ShiftOS.Frontend/Desktop | |
| parent | 10d2c0bbaa2b5c933a37056c784d3de84fa82eaf (diff) | |
| download | shiftos_thereturn-37cf129165916101ba665891d157c85ea9c37383.tar.gz shiftos_thereturn-37cf129165916101ba665891d157c85ea9c37383.tar.bz2 shiftos_thereturn-37cf129165916101ba665891d157c85ea9c37383.zip | |
The first loot!
Diffstat (limited to 'ShiftOS.Frontend/Desktop')
| -rw-r--r-- | ShiftOS.Frontend/Desktop/WindowManager.cs | 7 |
1 files changed, 7 insertions, 0 deletions
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(); |
