StepLabel (Dingsbums) fine-tuning, changed the mouse-move behavior to move the element instead of resizing it. Also changed the font, made it bold so it's more clearly readable and than a bit smaller to better fit the container.

This commit is contained in:
RKrom 2014-05-30 14:27:47 +02:00
commit 18d8d63180

View file

@ -63,7 +63,7 @@ namespace Greenshot.Drawing {
Width = 30; Width = 30;
Height = 30; Height = 30;
using (FontFamily fam = new FontFamily(FontFamily.GenericSansSerif.Name)) { using (FontFamily fam = new FontFamily(FontFamily.GenericSansSerif.Name)) {
_font = new Font(fam, 14, FontStyle.Regular, GraphicsUnit.Pixel); _font = new Font(fam, 12, FontStyle.Bold, GraphicsUnit.Pixel);
} }
return true; return true;
} }
@ -91,6 +91,14 @@ namespace Greenshot.Drawing {
base.Dispose(); base.Dispose();
} }
public override bool HandleMouseMove(int x, int y) {
Invalidate();
Left = x - (Width / 2);
Top = y - (Height / 2);
Invalidate();
return true;
}
/// <summary> /// <summary>
/// Override the parent, calculate the label number, than draw /// Override the parent, calculate the label number, than draw
/// </summary> /// </summary>