diff options
| author | Michael <[email protected]> | 2017-05-20 16:09:50 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-05-23 18:15:05 -0400 |
| commit | 6747c63e2c8c5a274846da7200c50a444b725d28 (patch) | |
| tree | 07ae072a6e661f3bc7b217f0e2311acc8bd1de00 /ShiftOS.WinForms/Tools | |
| parent | fe2a1a84c3a45c88c20fcea1e6970b0644279d52 (diff) | |
| download | shiftos_thereturn-6747c63e2c8c5a274846da7200c50a444b725d28.tar.gz shiftos_thereturn-6747c63e2c8c5a274846da7200c50a444b725d28.tar.bz2 shiftos_thereturn-6747c63e2c8c5a274846da7200c50a444b725d28.zip | |
Tiny skinning fixes.
Diffstat (limited to 'ShiftOS.WinForms/Tools')
| -rw-r--r-- | ShiftOS.WinForms/Tools/ControlManager.cs | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/ShiftOS.WinForms/Tools/ControlManager.cs b/ShiftOS.WinForms/Tools/ControlManager.cs index 4f888ab..fc9567d 100644 --- a/ShiftOS.WinForms/Tools/ControlManager.cs +++ b/ShiftOS.WinForms/Tools/ControlManager.cs @@ -220,13 +220,22 @@ namespace ShiftOS.WinForms.Tools Desktop.InvokeOnWorkerThread(() => { Button b = ctrl as Button; - b.BackColor = SkinEngine.LoadedSkin.ButtonBackgroundColor; - b.BackgroundImage = SkinEngine.GetImage("buttonidle"); - b.BackgroundImageLayout = SkinEngine.GetImageLayout("buttonidle"); + if (!b.Tag.ToString().ToLower().Contains("keepbg")) + { + b.BackColor = SkinEngine.LoadedSkin.ButtonBackgroundColor; + b.BackgroundImage = SkinEngine.GetImage("buttonidle"); + b.BackgroundImageLayout = SkinEngine.GetImageLayout("buttonidle"); + } b.FlatAppearance.BorderSize = SkinEngine.LoadedSkin.ButtonBorderWidth; - b.FlatAppearance.BorderColor = SkinEngine.LoadedSkin.ButtonForegroundColor; - b.ForeColor = SkinEngine.LoadedSkin.ButtonForegroundColor; - b.Font = SkinEngine.LoadedSkin.ButtonTextFont; + if (!b.Tag.ToString().ToLower().Contains("keepfg")) + { + b.FlatAppearance.BorderColor = SkinEngine.LoadedSkin.ButtonForegroundColor; + b.ForeColor = SkinEngine.LoadedSkin.ButtonForegroundColor; + } + if(!b.Tag.ToString().ToLower().Contains("keepfont")) + b.Font = SkinEngine.LoadedSkin.ButtonTextFont; + + Color orig_bg = b.BackColor; b.MouseEnter += (o, a) => { @@ -236,13 +245,13 @@ namespace ShiftOS.WinForms.Tools }; b.MouseLeave += (o, a) => { - b.BackColor = SkinEngine.LoadedSkin.ButtonBackgroundColor; + b.BackColor = orig_bg; b.BackgroundImage = SkinEngine.GetImage("buttonidle"); b.BackgroundImageLayout = SkinEngine.GetImageLayout("buttonidle"); }; b.MouseUp += (o, a) => { - b.BackColor = SkinEngine.LoadedSkin.ButtonBackgroundColor; + b.BackColor = orig_bg; b.BackgroundImage = SkinEngine.GetImage("buttonidle"); b.BackgroundImageLayout = SkinEngine.GetImageLayout("buttonidle"); }; @@ -257,6 +266,14 @@ namespace ShiftOS.WinForms.Tools }); } + if(ctrl is TextBox) + { + Desktop.InvokeOnWorkerThread(() => + { + (ctrl as TextBox).BorderStyle = BorderStyle.FixedSingle; + }); + } + ctrl.KeyDown += (o, a) => { if (a.Control && a.KeyCode == Keys.T) |
