aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms
diff options
context:
space:
mode:
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)