workaround for supremely annoying UI glitch where you could accidentally hide the file selector header by accident.

using the logic - that a header taking up the full screen-area height will not have an action-zone added for resizing.
This commit is contained in:
Campbell Barton
2011-06-05 09:22:14 +00:00
parent 07619d8fc0
commit 1d236097ab

View File

@@ -815,8 +815,18 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, int
ar->winrct.xmax= ar->winrct.xmin;
}
/* in end, add azones, where appropriate */
region_azone_add(sa, ar, alignment);
if(ar->regiontype == RGN_TYPE_HEADER && ar->winy + 6 > sa->winy) {
/* The logic for this is: when the header takes up the full area,
* disallow hiding it to view the main window.
*
* Without this, uou can drag down the file selectors header and hide it
* by accident very easily (highly annoying!), the value 6 is arbitrary
* but accounts for small common rounding problems when scaling the UI,
* must be minimum '4' */
}
else {
region_azone_add(sa, ar, alignment);
}
region_rect_recursive(sa, ar->next, remainder, quad);
}