From 1a3a9b4a4c82bab2417955c81acddb85352d9013 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 15 Apr 2017 09:13:08 -0400 Subject: [PATCH] fix skin loader preview --- ShiftOS.WinForms/Applications/Skin Loader.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ShiftOS.WinForms/Applications/Skin Loader.cs b/ShiftOS.WinForms/Applications/Skin Loader.cs index 58b444c..1f09e4a 100644 --- a/ShiftOS.WinForms/Applications/Skin Loader.cs +++ b/ShiftOS.WinForms/Applications/Skin Loader.cs @@ -47,12 +47,20 @@ namespace ShiftOS.WinForms.Applications public Skin_Loader() { InitializeComponent(); - + SetupControls(pnlborder); + SetupControls(pnldesktop); LoadedSkin = JsonConvert.DeserializeObject(JsonConvert.SerializeObject(SkinEngine.LoadedSkin)); this.Load += (o, a) => { SetupUI(); }; } + public void SetupControls(Control ctrl) + { + ctrl.Tag = "keepbg keepfg keepfont"; + foreach (Control c in ctrl.Controls) + SetupControls(c); + } + public Skin LoadedSkin { get; set; } public void SetupUI() @@ -318,6 +326,7 @@ namespace ShiftOS.WinForms.Applications public void OnSkinLoad() { + SetupUI(); } public bool OnUnload() @@ -327,6 +336,7 @@ namespace ShiftOS.WinForms.Applications public void OnUpgrade() { + SetupUI(); } } }