aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-05-20 16:09:50 -0400
committerMichael <[email protected]>2017-05-23 18:15:05 -0400
commit6747c63e2c8c5a274846da7200c50a444b725d28 (patch)
tree07ae072a6e661f3bc7b217f0e2311acc8bd1de00 /ShiftOS.WinForms
parentfe2a1a84c3a45c88c20fcea1e6970b0644279d52 (diff)
downloadshiftos_thereturn-6747c63e2c8c5a274846da7200c50a444b725d28.tar.gz
shiftos_thereturn-6747c63e2c8c5a274846da7200c50a444b725d28.tar.bz2
shiftos_thereturn-6747c63e2c8c5a274846da7200c50a444b725d28.zip
Tiny skinning fixes.
Diffstat (limited to 'ShiftOS.WinForms')
-rw-r--r--ShiftOS.WinForms/Applications/Shifter.cs7
-rw-r--r--ShiftOS.WinForms/Tools/ControlManager.cs33
2 files changed, 27 insertions, 13 deletions
diff --git a/ShiftOS.WinForms/Applications/Shifter.cs b/ShiftOS.WinForms/Applications/Shifter.cs
index edc3703..acb64a5 100644
--- a/ShiftOS.WinForms/Applications/Shifter.cs
+++ b/ShiftOS.WinForms/Applications/Shifter.cs
@@ -814,15 +814,12 @@ namespace ShiftOS.WinForms.Applications
ControlManager.SetupControl(color);
color.BackColor = ((Color)c.Field.GetValue(LoadedSkin));
- color.BackColorChanged += (o, a) =>
- {
- c.Field.SetValue(LoadedSkin, color.BackColor);
- };
color.Click += (o, a) =>
{
- AppearanceManager.SetupDialog(new ColorPicker(color.BackColor, c.Name, new Action<Color>((col) =>
+ AppearanceManager.SetupDialog(new ColorPicker((Color)c.Field.GetValue(LoadedSkin), c.Name, new Action<Color>((col) =>
{
color.BackColor = col;
+ c.Field.SetValue(LoadedSkin, col);
CodepointValue += 300;
InvokeSetup(cat);
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)