aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Frontend/GUI/ProgressBar.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/ProgressBar.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/ProgressBar.cs')
-rw-r--r--ShiftOS.Frontend/GUI/ProgressBar.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/ShiftOS.Frontend/GUI/ProgressBar.cs b/ShiftOS.Frontend/GUI/ProgressBar.cs
index e35dc27..a13bbf8 100644
--- a/ShiftOS.Frontend/GUI/ProgressBar.cs
+++ b/ShiftOS.Frontend/GUI/ProgressBar.cs
@@ -4,6 +4,7 @@ using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using ShiftOS.Frontend.GraphicsSubsystem;
using static ShiftOS.Engine.SkinEngine;
namespace ShiftOS.Frontend.GUI
@@ -37,11 +38,11 @@ namespace ShiftOS.Frontend.GUI
}
}
- protected override void OnPaint(Graphics gfx)
+ protected override void OnPaint(GraphicsContext gfx)
{
- gfx.Clear(LoadedSkin.ProgressBarBackgroundColor);
+ gfx.Clear(LoadedSkin.ProgressBarBackgroundColor.ToMonoColor());
int w = (int)linear(_value, 0, _maximum, 0, Width);
- gfx.FillRectangle(new SolidBrush(LoadedSkin.ProgressColor), new Rectangle(0, 0, w, Height));
+ gfx.DrawRectangle(0, 0, w, Height, LoadedSkin.ProgressColor.ToMonoColor());
}
static public double linear(double x, double x0, double x1, double y0, double y1)