diff options
| author | MichaelTheShifter <[email protected]> | 2016-07-19 21:53:26 -0400 |
|---|---|---|
| committer | MichaelTheShifter <[email protected]> | 2016-07-19 21:53:26 -0400 |
| commit | 6b804f03ebcdd1c5aa145f29ae71b62bd61f8cb9 (patch) | |
| tree | d7bc4b46c45a552add946666151d44490f3b3caf /source/WindowsFormsApplication1/SkinEngine | |
| parent | 9322701aa1eae9596a8586ef19a0fe1d1b3ab66b (diff) | |
| download | shiftos-c--6b804f03ebcdd1c5aa145f29ae71b62bd61f8cb9.tar.gz shiftos-c--6b804f03ebcdd1c5aa145f29ae71b62bd61f8cb9.tar.bz2 shiftos-c--6b804f03ebcdd1c5aa145f29ae71b62bd61f8cb9.zip | |
Full ShiftUI conversion
The only bugs are that windows don't show in the center of the screen,
and Gecko webbrowsers are not serializing properly to be converted to
ShiftUI widgets (you can use the ToWidget() extension method to convert
a WinForms control to a ShiftUI widget)
Also multiple desktop panels are removed due to some odd bug I can't
diagnose. Will add them back in the future. Promise. I loved creating
GNOME2 skins.
Diffstat (limited to 'source/WindowsFormsApplication1/SkinEngine')
3 files changed, 15 insertions, 8 deletions
diff --git a/source/WindowsFormsApplication1/SkinEngine/ShiftOSColorTable.cs b/source/WindowsFormsApplication1/SkinEngine/ShiftOSColorTable.cs index f74b7c2..fdf840b 100644 --- a/source/WindowsFormsApplication1/SkinEngine/ShiftOSColorTable.cs +++ b/source/WindowsFormsApplication1/SkinEngine/ShiftOSColorTable.cs @@ -4,7 +4,7 @@ // </auto-generated> using System.Drawing; -using System.Windows.Forms; +using ShiftUI; namespace ShiftOS { diff --git a/source/WindowsFormsApplication1/SkinEngine/WindowComposition.cs b/source/WindowsFormsApplication1/SkinEngine/WindowComposition.cs index 18fe2d1..99fd813 100644 --- a/source/WindowsFormsApplication1/SkinEngine/WindowComposition.cs +++ b/source/WindowsFormsApplication1/SkinEngine/WindowComposition.cs @@ -5,7 +5,7 @@ using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; -using System.Windows.Forms; +using ShiftUI; namespace ShiftOS { @@ -13,7 +13,7 @@ namespace ShiftOS { private static bool _CanClose = true; public static bool ShuttingDown = false; - public static bool SafeToAddControls = true; + public static bool SafeToAddWidgets = true; public static bool CanClose { @@ -57,7 +57,7 @@ namespace ShiftOS t.Start(); } - public static void ScaleWidget(Control ctrl, int width, int height) + public static void ScaleWidget(Widget ctrl, int width, int height) { ctrl.Size = new Size(0, 0); var t = new Timer(); diff --git a/source/WindowsFormsApplication1/SkinEngine/skins.cs b/source/WindowsFormsApplication1/SkinEngine/skins.cs index 8dcaea2..72f5021 100644 --- a/source/WindowsFormsApplication1/SkinEngine/skins.cs +++ b/source/WindowsFormsApplication1/SkinEngine/skins.cs @@ -4,7 +4,7 @@ using Newtonsoft.Json; using System; using ShiftOS; using System.IO.Compression; -using System.Windows.Forms; +using ShiftUI; using System.Collections.Generic; using System.Drawing.Imaging; @@ -568,9 +568,16 @@ namespace Skinning loadedSkin = JsonConvert.DeserializeObject<Skin>(rawData); if (File.Exists(Paths.LoadedSkin + "panels.json")) { - string panels = File.ReadAllText(Paths.LoadedSkin + "panels.json"); - loadedSkin.DesktopPanels = JsonConvert.DeserializeObject<List<DesktopPanel>>(panels); - LoadPanels(); + try + { + string panels = File.ReadAllText(Paths.LoadedSkin + "panels.json"); + loadedSkin.DesktopPanels = JsonConvert.DeserializeObject<List<DesktopPanel>>(panels); + LoadPanels(); + } + catch + { + + } } loadimages(); LoadEmbeddedNamePack(); |
