aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Engine/WindowManager/ShiftWM.cs
diff options
context:
space:
mode:
authorAShifter <[email protected]>2017-10-14 09:27:27 -0600
committerAShifter <[email protected]>2017-10-14 09:27:27 -0600
commite9a8a6df70337a061384b46816f7e4b552145946 (patch)
treeecffc875d8b6aa48d7083c00c992e90cb426761b /ShiftOS.Engine/WindowManager/ShiftWM.cs
parent385d800066822cdf7467a90f6168026b6603573e (diff)
downloadshiftos-rewind-e9a8a6df70337a061384b46816f7e4b552145946.tar.gz
shiftos-rewind-e9a8a6df70337a061384b46816f7e4b552145946.tar.bz2
shiftos-rewind-e9a8a6df70337a061384b46816f7e4b552145946.zip
More Skinning
You can now set a skin and it will persist throughout all windows - though there is a bug where hovering over a context button will change it's color and leaving it will change it back to black. Will fix soon:tm:.
Diffstat (limited to 'ShiftOS.Engine/WindowManager/ShiftWM.cs')
-rw-r--r--ShiftOS.Engine/WindowManager/ShiftWM.cs37
1 files changed, 33 insertions, 4 deletions
diff --git a/ShiftOS.Engine/WindowManager/ShiftWM.cs b/ShiftOS.Engine/WindowManager/ShiftWM.cs
index 594848a..64b84f9 100644
--- a/ShiftOS.Engine/WindowManager/ShiftWM.cs
+++ b/ShiftOS.Engine/WindowManager/ShiftWM.cs
@@ -33,13 +33,42 @@ namespace ShiftOS.Engine.WindowManager
{
Text = title,
Title = {Text = title}
- };
+ };
+
+ app.Width = content.Width + app.leftSide.Width + app.rightSide.Width;
+ app.Height = content.Height + app.bottomSide.Height + app.titleBar.Height;
+
+ if (ShiftSkinData.titleBarColor == Color.Empty)
+ {
+ Color borderColor = Color.FromArgb(64, 64, 64);
+ ShiftSkinData.btnCloseColor = Color.Black;
+ ShiftSkinData.btnMaxColor = Color.Black;
+ ShiftSkinData.btnMinColor = Color.Black;
+ ShiftSkinData.leftTopCornerColor = borderColor;
+ ShiftSkinData.titleBarColor = borderColor;
+ ShiftSkinData.rightTopCornerColor = borderColor;
+ ShiftSkinData.leftSideColor = borderColor;
+ ShiftSkinData.rightSideColor = borderColor;
+ ShiftSkinData.leftBottomCornerColor = borderColor;
+ ShiftSkinData.bottomSideColor = borderColor;
+ ShiftSkinData.rightBottomCornerColor = borderColor;
+ }
- app.Width = content.Width + app.left.Width + app.right.Width;
- app.Height = content.Height + app.bottom.Height + app.top.Height;
+ app.btnClose.BackColor = ShiftSkinData.btnCloseColor;
+ app.btnMax.BackColor = ShiftSkinData.btnMaxColor;
+ app.btnMin.BackColor = ShiftSkinData.btnMinColor;
+ app.leftTopCorner.BackColor = ShiftSkinData.leftTopCornerColor;
+ app.titleBar.BackColor = ShiftSkinData.titleBarColor;
+ app.rightTopCorner.BackColor = ShiftSkinData.rightTopCornerColor;
+ app.leftSide.BackColor = ShiftSkinData.leftSideColor;
+ app.rightSide.BackColor = ShiftSkinData.rightSideColor;
+ app.leftBottomCorner.BackColor = ShiftSkinData.leftBottomCornerColor;
+ app.bottomSide.BackColor = ShiftSkinData.bottomSideColor;
+ app.rightBottomCorner.BackColor = ShiftSkinData.rightBottomCornerColor;
+
// Icon Setup
- if (icon == null)
+ if (icon == null)
{
app.programIcon.Hide();
app.programIcon.Image = Properties.Resources.nullIcon;