fix skin loader preview
This commit is contained in:
parent
0bc8eef195
commit
1a3a9b4a4c
1 changed files with 11 additions and 1 deletions
|
@ -47,12 +47,20 @@ namespace ShiftOS.WinForms.Applications
|
|||
public Skin_Loader()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
SetupControls(pnlborder);
|
||||
SetupControls(pnldesktop);
|
||||
LoadedSkin = JsonConvert.DeserializeObject<Skin>(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue