Skip to content

Commit

Permalink
Fix #1268333 - Increase the selection handle size and tolerance.
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronwhite committed Feb 16, 2015
1 parent 629fea4 commit b856f44
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Pinta.Tools/Tools/ToolControl/ToolControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public ToolControl (MouseHandler moveAction)
Position = new PointD (-5, -5);
}

private const int Tolerance = 3;
private const int Size = 6;
private const int Tolerance = 10;
public static readonly Cairo.Color FillColor = new Cairo.Color (0, 0, 1, 0.5);
public static readonly Cairo.Color StrokeColor = new Cairo.Color (0, 0, 1, 0.7);
private MouseHandler action;
Expand All @@ -59,8 +60,9 @@ public void Render (Layer layer)
{
double scale_factor = (1.0 / PintaCore.Workspace.ActiveWorkspace.Scale);
using (Context g = new Context (layer.Surface)) {
var rect = new Cairo.Rectangle (Position.X - scale_factor * 2, Position.Y - scale_factor * 2,
scale_factor * 4, scale_factor * 4);
var rect = new Cairo.Rectangle (Position.X - scale_factor * Size / 2,
Position.Y - scale_factor * Size / 2,
scale_factor * Size, scale_factor * Size);
g.FillStrokedRectangle (rect, FillColor, StrokeColor, 1);
}
}
Expand Down

0 comments on commit b856f44

Please sign in to comment.