Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-06-05 13:22:14 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-06-05 13:22:14 +0400
commit1d236097ab2ddb61c52ff68ed0f487e54bc0e4a0 (patch)
tree1aa7ae31e7fea4ff0a299912823caead67e7f358 /source/blender/editors/screen
parent07619d8fc0cf13ee852db9a793a02b8955068636 (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.c14
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);
}