Page MenuHome

Incorrect Splitter Zone Shapes
ClosedPublic

Authored by Harley Acheson (harley) on Sat, Dec 29, 9:28 PM.

Details

Summary

Have to assume you will not believe me on this one at first so will take it slowly...

We used to draw little triangles slashes at some corners of the editors to indicate where splitting or joining could be initiated. At that time there was a rectangular clipping area for the cursor test and then inside it tested on a triangular shape. So the mouse "hit" area roughly matched that shape.

For version 2.80 we are now allowing split/join at every corner. To avoid added visual mess we have removed the corner visual indicators.

It was at that time that the code to detect mouse hit was changed. The triangle intersect was swapped out for one based on a circle. A comment added says "no triangle intersect but a hotspot circle based on corner"

The intention was to have a test that looks like a quarter-circle in the corner. Unfortunately that test is based on distance from a corner of each azone clipping area. But it uses the same corner for each one. So the resulting test looks like the purple areas shown below:

So bottom-left area of an editor behaves as intended, while the others have an incorrect shape so are missing portions that could make it harder to hit, especially the top-right.

It can be tough to spot this. If you increase the user preference display scale to 4 it can help to see where the mouse changes to a "+" cursor. To see it really easily you'd need to temporarily increase AZONESPOT (screen_intern.h, 40) to something like 2.

This patch fixes this by removing the circular test and just uses the AZONESPOT x AZONESPOT rectangular area. This is the rectangle that is as wide as possible between the screen edge and the editor change button. And then it is as high as it is wide.

A rectangular hit zone seems to be the most obvious shape here and is certainly the easiest to guess and hit.

Note that we could make this a little bigger too. But we'd have to not only increase AZONESPOT but also set UI_HEADER_OFFSET to the same amount, which gives greater left-right padding to the header (moves the change editor button to the right). But splitting and joining worked before with the current button placement and this new (fixed) hit zone is even bigger than that. So I would suggest we do this change and then see if we need to increase the zone.

Diff Detail

Repository
rB Blender

Event Timeline

This revision is now accepted and ready to land.Fri, Jan 4, 3:21 PM
This revision was automatically updated to reflect the committed changes.