diff options
| author | MichaelTheShifter <[email protected]> | 2016-07-20 09:17:10 -0400 |
|---|---|---|
| committer | MichaelTheShifter <[email protected]> | 2016-07-20 09:17:10 -0400 |
| commit | f1856e8ed30ed882229fd3fa2a4038122a5fb441 (patch) | |
| tree | f07964fa90b80fbb210b1a87a847481430502146 /source/WindowsFormsApplication1/Engine/Lua_Interp.cs | |
| parent | d5f6a04902749e73530eae1e1e0f97cb78525334 (diff) | |
| download | shiftos-c--f1856e8ed30ed882229fd3fa2a4038122a5fb441.tar.gz shiftos-c--f1856e8ed30ed882229fd3fa2a4038122a5fb441.tar.bz2 shiftos-c--f1856e8ed30ed882229fd3fa2a4038122a5fb441.zip | |
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)
Diffstat (limited to 'source/WindowsFormsApplication1/Engine/Lua_Interp.cs')
| -rw-r--r-- | source/WindowsFormsApplication1/Engine/Lua_Interp.cs | 15 |
1 files changed, 14 insertions, 1 deletions
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 { + /// <summary> + /// 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. + /// </summary> + /// <param name="ctrl">The Windows Forms control to convert</param> + /// <returns>The converted widget.</returns> public static Widget ToWidget(this System.Windows.Forms.Control ctrl) { string json = JsonConvert.SerializeObject(ctrl); |
