Page MenuHome

UI: Allow Joining of Tiny Screen Areas
ClosedPublic

Authored by Harley Acheson (harley) on Nov 16 2022, 6:00 AM.

Details

Summary

Allow joining of areas that are below our minimum sizes.


This isn't related to D16519: Fix T100772: Joins with Interfering Tiny Areas , which is concerned with ensuring that narrow areas (smaller than our minimum sizes) do not interfere with the joining of neighboring areas. This is about our current inability to perform some complex joins on these types of areas themselves.

This patch corrects an (own) error in our current area_getorientation. That function returns the directional relationship between two areas. It is used to determine whether two areas can be joined.

Part of this code ensures that the two areas share a common edge by at least the minimum sizes for areas. Unfortunately if either of the areas is already less than minimum size then this cannot ever be the case. Instead the minimum for this should be the MIN of those minimums and the widths of the source areas.

We try to avoid sub-minimum areas, but they cannot be always avoided. If you end up saddled with one, we should make sure you have all the tools available to get rid of it. Following show joining a skinny area, not possible now:

While in that function I made it MUCH easier to follow. Should be much more obvious and simple now.

Diff Detail

Repository
rB Blender

Event Timeline

Harley Acheson (harley) requested review of this revision.Nov 16 2022, 6:00 AM
Harley Acheson (harley) created this revision.
Harley Acheson (harley) edited the summary of this revision. (Show Details)Nov 16 2022, 6:09 AM
This revision is now accepted and ready to land.Nov 16 2022, 8:01 AM
source/blender/editors/screen/screen_edit.c
271–279

*picky* minor preference for _a/_b, reads better.

286–287

*picky* can be const.

Harley Acheson (harley) marked 2 inline comments as done.

Updated to incorporate changes suggested by review. Small change required to new screen_areas_can_align so that tiny areas pass if participating, rather than interfering (own code).

This revision was automatically updated to reflect the committed changes.