aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Frontend/GUI/TextControl.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS.Frontend/GUI/TextControl.cs')
-rw-r--r--ShiftOS.Frontend/GUI/TextControl.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/ShiftOS.Frontend/GUI/TextControl.cs b/ShiftOS.Frontend/GUI/TextControl.cs
index 79da213..37b9ca7 100644
--- a/ShiftOS.Frontend/GUI/TextControl.cs
+++ b/ShiftOS.Frontend/GUI/TextControl.cs
@@ -53,9 +53,9 @@ namespace ShiftOS.Frontend.GUI
set { _textAlign = value; }
}
- public override void Paint(Graphics gfx)
+ protected override void OnPaint(Graphics gfx)
{
- var sMeasure = gfx.MeasureString(_text, _font);
+ var sMeasure = gfx.MeasureString(_text, _font, Width);
PointF loc = new PointF(2, 2);
float centerH = (Width - sMeasure.Width) / 2;
float centerV = (Height - sMeasure.Height) / 2;