From f1856e8ed30ed882229fd3fa2a4038122a5fb441 Mon Sep 17 00:00:00 2001 From: MichaelTheShifter Date: Wed, 20 Jul 2016 09:17:10 -0400 Subject: Fix graphical glitch with buttons. This glitch has been prevelant ever since ShiftOS first had Knowledge Input. And I don't mean 0.1.0, I mean all the way back before 0.0.5 when OSFirstTimer was developing it. Basically, buttons would show light gray backgrounds when you click on them. Now they show black (and it's skinnable :D) --- source/WindowsFormsApplication1/Engine/Lua_Interp.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'source/WindowsFormsApplication1/Engine/Lua_Interp.cs') diff --git a/source/WindowsFormsApplication1/Engine/Lua_Interp.cs b/source/WindowsFormsApplication1/Engine/Lua_Interp.cs index be37449..fabc1be 100644 --- a/source/WindowsFormsApplication1/Engine/Lua_Interp.cs +++ b/source/WindowsFormsApplication1/Engine/Lua_Interp.cs @@ -1113,7 +1113,7 @@ end"); break; case "button": var btn = new Button(); - btn.FlatStyle = FlatStyle.Flat; + btn.FlatStyle = FlatStyle.Standard; if(darkmode) { //Set dark button @@ -1451,6 +1451,19 @@ end"); public static class Extensions { + /// + /// Attempts to convert a Windows Forms control to a ShiftUI widget + /// using JSON.NET. + /// + /// This may fail due to architecture differences in the WinForms and + /// ShiftUI code. + /// + /// Exceptions: + /// - JsonSerializationException: Occurs when a control has some + /// data that JSON.NET can't serialize. + /// + /// The Windows Forms control to convert + /// The converted widget. public static Widget ToWidget(this System.Windows.Forms.Control ctrl) { string json = JsonConvert.SerializeObject(ctrl); -- cgit v1.2.3