diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-06-05 13:22:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-06-05 13:22:14 +0400 |
commit | 1d236097ab2ddb61c52ff68ed0f487e54bc0e4a0 (patch) | |
tree | 1aa7ae31e7fea4ff0a299912823caead67e7f358 /source/blender/editors/screen | |
parent | 07619d8fc0cf13ee852db9a793a02b8955068636 (diff) |
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.
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/area.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index fb535f2fee5..f37e2618ed4 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -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); } |