From 68362b4c6fe2e740ac02f7b4cb1ae77de3cfbd09 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 3 Jul 2017 08:55:21 -0400 Subject: major optimizations, draggable windows --- ShiftOS.Frontend/GUI/TextControl.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ShiftOS.Frontend/GUI/TextControl.cs') 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; -- cgit v1.2.3