Page MenuHome

Improved Window Border Selection (Simple)

Authored by Harley Acheson (harley) on Fri, May 22, 6:47 PM.



Resizing areas is made more difficult than is should be because of a long-standing issue: the dark borders you see between editors is actually wider than the gaps between editors. By default you see a 3 pixel-wide border, but you actually have to hit a gap that is only single pixel wide.

Following is a summary of the current differences between what you see and what you must hit:

I have tried to address this in a couple ways previously, but it always gets quite complex. Making the gap widths match the border widths, while keeping everything else the same, results in blurry edges because the current border-drawing results in subpixels (a default border of 1 1/2 pixels around areas). And doing it so that borders are not overprinting the areas requires very complex corner rounding in order to match the non-opaque jitterred areas to solid-color borders.

This patch solves this in a very trivial way. When we are checking to see if the mouse is on an edge, we just act like the edges are wider than they are.

This works so well that this patch expands them slightly more than needed to make them even easier to use. So currently, by default we must hit a single pixel despite seeing a 3-pixel gap, so it is 3 times harder than it looks. With this patch the gap is 5 pixels so it is even easier than it looks. Five times easier to hit than it is now.

Diff Detail

rB Blender

Event Timeline

Harley Acheson (harley) requested review of this revision.Fri, May 22, 6:47 PM
Harley Acheson (harley) created this revision.
This revision is now accepted and ready to land.Fri, May 22, 10:26 PM

I like it! When you are trying to select something that is 3 pixels wide, every single pixel matters. The target is easier to hit, taking the strain off the mouse arm and the eyes as they try to gain precision.

Sorry you had to go through hoops to get here... but I guess we all know the code just a tiny bit better, and things behave in a way that one would expect.
My future 65 year old self will thank you again. ;)