aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/Tools/ControlManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS.WinForms/Tools/ControlManager.cs')
-rw-r--r--ShiftOS.WinForms/Tools/ControlManager.cs33
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)