aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Frontend/GUI/Button.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-07-03 08:55:21 -0400
committerMichael <[email protected]>2017-07-03 08:55:21 -0400
commit68362b4c6fe2e740ac02f7b4cb1ae77de3cfbd09 (patch)
treea346b092eee671ab9fae32cbca23d22b171c748b /ShiftOS.Frontend/GUI/Button.cs
parent6f3a5cba2ea08ea6f442e2336b74f32f4bbc0604 (diff)
downloadshiftos_thereturn-68362b4c6fe2e740ac02f7b4cb1ae77de3cfbd09.tar.gz
shiftos_thereturn-68362b4c6fe2e740ac02f7b4cb1ae77de3cfbd09.tar.bz2
shiftos_thereturn-68362b4c6fe2e740ac02f7b4cb1ae77de3cfbd09.zip
major optimizations, draggable windows
Diffstat (limited to 'ShiftOS.Frontend/GUI/Button.cs')
-rw-r--r--ShiftOS.Frontend/GUI/Button.cs9
1 files changed, 4 insertions, 5 deletions
diff --git a/ShiftOS.Frontend/GUI/Button.cs b/ShiftOS.Frontend/GUI/Button.cs
index c2e41a3..551d0d4 100644
--- a/ShiftOS.Frontend/GUI/Button.cs
+++ b/ShiftOS.Frontend/GUI/Button.cs
@@ -25,14 +25,13 @@ namespace ShiftOS.Frontend.GUI
using (var gfx = Graphics.FromImage(new Bitmap(1, 1)))
{
var measure = gfx.MeasureString(this.Text, this.Font);
- Width = borderwidth + (int)measure.Width + 4;
- Height = borderwidth + (int)measure.Height + 8;
+ Width = borderwidth + (int)measure.Width + 16;
+ Height = borderwidth + (int)measure.Height + 12;
}
}
- base.OnLayout();
}
- public override void Paint(Graphics gfx)
+ protected override void OnPaint(Graphics gfx)
{
Color bgCol = SkinEngine.LoadedSkin.ButtonBackgroundColor;
Color fgCol = SkinEngine.LoadedSkin.ControlTextColor;
@@ -43,7 +42,7 @@ namespace ShiftOS.Frontend.GUI
gfx.Clear(bgCol);
gfx.DrawRectangle(new Pen(new SolidBrush(fgCol), SkinEngine.LoadedSkin.ButtonBorderWidth), new Rectangle(0, 0, Width, Height));
- base.Paint(gfx);
+ base.OnPaint(gfx);
}
}