[Bf-blender-cvs] [01880202d8f] topbar: Cleanup: Change flag name, add comment
Julian Eisel
noreply at git.blender.org
Sat Oct 21 16:17:33 CEST 2017
Commit: 01880202d8f51bc7ff650c7a56ea5792046a12f7
Author: Julian Eisel
Date: Sat Oct 21 16:17:10 2017 +0200
Branches: topbar
https://developer.blender.org/rB01880202d8f51bc7ff650c7a56ea5792046a12f7
Cleanup: Change flag name, add comment
===================================================================
M source/blender/editors/screen/area.c
M source/blender/editors/space_topbar/space_topbar.c
M source/blender/makesdna/DNA_screen_types.h
===================================================================
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 86ae1dcd4b9..57bb2646722 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -2126,7 +2126,7 @@ void ED_region_header(const bContext *C, ARegion *ar)
int maxco, xco, yco;
int headery = ED_area_headersize();
const int start_ofs = 0.4f * UI_UNIT_X;
- bool region_layout_based = ar->flag & RGN_RESIZE_LAYOUT_BASED;
+ bool region_layout_based = ar->flag & RGN_FLAG_DYNAMIC_SIZE;
/* clear */
UI_ThemeClearColor(region_background_color_id(C, ar));
@@ -2169,7 +2169,6 @@ void ED_region_header(const bContext *C, ARegion *ar)
sa->flag |= AREA_FLAG_REGION_SIZE_UPDATE;
ar->flag |= RGN_SIZEX_DPI_APPLIED;
- ar->flag &= ~RGN_RESIZE_LAYOUT_BASED;
}
UI_block_end(C, block);
UI_block_draw(C, block);
diff --git a/source/blender/editors/space_topbar/space_topbar.c b/source/blender/editors/space_topbar/space_topbar.c
index 1776df3f61d..35858a927fe 100644
--- a/source/blender/editors/space_topbar/space_topbar.c
+++ b/source/blender/editors/space_topbar/space_topbar.c
@@ -121,7 +121,7 @@ static void topbar_main_region_init(wmWindowManager *wm, ARegion *region)
/* force delayed UI_view2d_region_reinit call */
if (ELEM(region->alignment, RGN_ALIGN_LEFT, RGN_ALIGN_RIGHT)) {
- region->flag |= RGN_RESIZE_LAYOUT_BASED;
+ region->flag |= RGN_FLAG_DYNAMIC_SIZE;
}
UI_view2d_region_reinit(®ion->v2d, V2D_COMMONVIEW_HEADER, region->winx, region->winy);
@@ -148,7 +148,7 @@ static void topbar_keymap(struct wmKeyConfig *UNUSED(keyconf))
static void topbar_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar)
{
if ((ar->alignment & ~RGN_SPLIT_PREV) == RGN_ALIGN_RIGHT) {
- ar->flag |= RGN_RESIZE_LAYOUT_BASED;
+ ar->flag |= RGN_FLAG_DYNAMIC_SIZE;
}
ED_region_header_init(ar);
}
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
index 54cd4082d9d..97792dbf0ef 100644
--- a/source/blender/makesdna/DNA_screen_types.h
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -424,9 +424,11 @@ enum {
/* Force delayed reinit of region size data, so that region size is calculated
* just big enough to show all its content (if enough space is available).
* Note that only ED_region_header supports this right now. */
- RGN_RESIZE_LAYOUT_BASED = (1 << 2),
+ RGN_FLAG_DYNAMIC_SIZE = (1 << 2),
/* The region width stored in ARegion.sizex already has the DPI
- * factor applied, skip applying it again (in region_rect_recursive) */
+ * factor applied, skip applying it again (in region_rect_recursive).
+ * XXX Not nice at all. Leaving for now as temporary solution, but
+ * it might cause issues if we change how ARegion.sizex is used... */
RGN_SIZEX_DPI_APPLIED = (1 << 3),
};
More information about the Bf-blender-cvs
mailing list