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:
authorAndrea Weikert <elubie@gmx.net>2019-08-18 17:34:39 +0300
committerAndrea Weikert <elubie@gmx.net>2019-08-18 17:42:41 +0300
commit38380ddca373cd7f49e3d6e831480ff05a2af72e (patch)
tree4aa23983fd0f9454b30f99b0258712b8c21b6284 /source/blender/editors/screen/area.c
parent454b120f48201abe2e1a9ca7e5d25c28cb04013a (diff)
Fix T67008: Missing move handle and flickering in FileBrowser
Fix T67008: Missing move handle and flickering in FileBrowser Allow split regions (child regions) to contribute to the action zones (azone) of the parent region. This fixes the issues in file browser and also in the user preferences. Reviewers: Severin, mont29, campbellbarton Reviewed By: Severin, mont29, campbellbarton Subscribers: brecht, campbellbarton Maniphest Tasks: T67008 Differential Revision: https://developer.blender.org/D5273
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r--source/blender/editors/screen/area.c38
1 files changed, 27 insertions, 11 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 1775a0c55a2..8a5b30df1a4 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1052,16 +1052,11 @@ static void region_azones_scrollbars_initialize(ScrArea *sa, ARegion *ar)
}
/* *************************************************************** */
-
-static void region_azones_add(const bScreen *screen, ScrArea *sa, ARegion *ar, const int alignment)
+static void region_azones_add_edge(ScrArea *sa,
+ ARegion *ar,
+ const int alignment,
+ const bool is_fullscreen)
{
- const bool is_fullscreen = screen->state == SCREENFULL;
-
- /* Only display tab or icons when the header region is hidden
- * (not the tool header - they overlap). */
- if (ar->regiontype == RGN_TYPE_TOOL_HEADER) {
- return;
- }
/* edge code (t b l r) is along which area edge azone will be drawn */
if (alignment == RGN_ALIGN_TOP) {
@@ -1077,6 +1072,27 @@ static void region_azones_add(const bScreen *screen, ScrArea *sa, ARegion *ar, c
region_azone_edge_initialize(sa, ar, AE_RIGHT_TO_TOPLEFT, is_fullscreen);
}
+}
+
+static void region_azones_add(const bScreen *screen, ScrArea *sa, ARegion *ar)
+{
+ const bool is_fullscreen = screen->state == SCREENFULL;
+
+ /* Only display tab or icons when the header region is hidden
+ * (not the tool header - they overlap). */
+ if (ar->regiontype == RGN_TYPE_TOOL_HEADER) {
+ return;
+ }
+
+ region_azones_add_edge(sa, ar, RGN_ALIGN_ENUM_FROM_MASK(ar->alignment), is_fullscreen);
+
+ /* For a split region also continue the azone edge from the next region if this region is aligned
+ * with the next */
+ if ((ar->alignment & RGN_SPLIT_PREV) && ar->prev) {
+ region_azones_add_edge(
+ sa, ar, RGN_ALIGN_ENUM_FROM_MASK(ar->prev->alignment), is_fullscreen);
+ }
+
if (is_fullscreen) {
fullscreen_azone_initialize(sa, ar);
}
@@ -1695,7 +1711,7 @@ void ED_area_update_region_sizes(wmWindowManager *wm, wmWindow *win, ScrArea *ar
}
/* Some AZones use View2D data which is only updated in region init, so call that first! */
- region_azones_add(screen, area, ar, RGN_ALIGN_ENUM_FROM_MASK(ar->alignment));
+ region_azones_add(screen, area, ar);
}
ED_area_azones_update(area, &win->eventstate->x);
@@ -1766,7 +1782,7 @@ void ED_area_initialize(wmWindowManager *wm, wmWindow *win, ScrArea *sa)
}
/* Some AZones use View2D data which is only updated in region init, so call that first! */
- region_azones_add(screen, sa, ar, RGN_ALIGN_ENUM_FROM_MASK(ar->alignment));
+ region_azones_add(screen, sa, ar);
}
/* Avoid re-initializing tools while resizing the window. */