aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Frontend/GUI/Button.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-07-04 17:57:29 -0400
committerMichael <[email protected]>2017-07-04 17:57:29 -0400
commit2adb8859edb95921e8f6d3cbb41fdc349825d6f8 (patch)
treeaa1780fe7f8e2c7ab759429aa53717d7a14ca7ef /ShiftOS.Frontend/GUI/Button.cs
parent5515881e922de087f4e0f5db51ae681bcd7f70d6 (diff)
downloadshiftos_thereturn-2adb8859edb95921e8f6d3cbb41fdc349825d6f8.tar.gz
shiftos_thereturn-2adb8859edb95921e8f6d3cbb41fdc349825d6f8.tar.bz2
shiftos_thereturn-2adb8859edb95921e8f6d3cbb41fdc349825d6f8.zip
abandon system.drawing for anything other than text
Diffstat (limited to 'ShiftOS.Frontend/GUI/Button.cs')
-rw-r--r--ShiftOS.Frontend/GUI/Button.cs15
1 files changed, 7 insertions, 8 deletions
diff --git a/ShiftOS.Frontend/GUI/Button.cs b/ShiftOS.Frontend/GUI/Button.cs
index 551d0d4..7d6804a 100644
--- a/ShiftOS.Frontend/GUI/Button.cs
+++ b/ShiftOS.Frontend/GUI/Button.cs
@@ -5,6 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ShiftOS.Engine;
+using ShiftOS.Frontend.GraphicsSubsystem;
namespace ShiftOS.Frontend.GUI
{
@@ -31,19 +32,17 @@ namespace ShiftOS.Frontend.GUI
}
}
- protected override void OnPaint(Graphics gfx)
+ protected override void OnPaint(GraphicsContext gfx)
{
- Color bgCol = SkinEngine.LoadedSkin.ButtonBackgroundColor;
- Color fgCol = SkinEngine.LoadedSkin.ControlTextColor;
+ var bgCol = SkinEngine.LoadedSkin.ButtonBackgroundColor.ToMonoColor();
+ var fgCol = SkinEngine.LoadedSkin.ControlTextColor.ToMonoColor();
if (ContainsMouse)
- bgCol = SkinEngine.LoadedSkin.ButtonHoverColor;
+ bgCol = SkinEngine.LoadedSkin.ButtonHoverColor.ToMonoColor();
if (MouseLeftDown)
- bgCol = SkinEngine.LoadedSkin.ButtonPressedColor;
+ bgCol = SkinEngine.LoadedSkin.ButtonPressedColor.ToMonoColor();
- gfx.Clear(bgCol);
- gfx.DrawRectangle(new Pen(new SolidBrush(fgCol), SkinEngine.LoadedSkin.ButtonBorderWidth), new Rectangle(0, 0, Width, Height));
base.OnPaint(gfx);
-
+ base.OnPaint(gfx);
}
}
}