diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-29 13:24:08 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-29 23:11:12 +0300 |
commit | 7a9f64e6657a231289f56b0a8c9949c8f7a23c59 (patch) | |
tree | efee3c4ac1988ad96d743f1d82e7a677096ca0c3 /source/blender/blenkernel/BKE_screen.h | |
parent | 0c512a6f951e36e29d2f6865cc975f7e40c4d31d (diff) |
UI: better support for dynamically sized regions in topbar.
Dynamically sized regions in the topbar were flickering due to only updating
their size after redraws. Now there is an optional layout() callback for
all regions in an area to do UI layout first, then refresh the region layout,
and then do the actual drawing for each region.
Task T54753
Diffstat (limited to 'source/blender/blenkernel/BKE_screen.h')
-rw-r--r-- | source/blender/blenkernel/BKE_screen.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h index 17cca92c1fc..36708cb11a4 100644 --- a/source/blender/blenkernel/BKE_screen.h +++ b/source/blender/blenkernel/BKE_screen.h @@ -140,8 +140,8 @@ typedef struct ARegionType { void (*exit)(struct wmWindowManager *, struct ARegion *); /* draw entirely, view changes should be handled here */ void (*draw)(const struct bContext *, struct ARegion *); - /* optional, refresh popup before drawing */ - void (*refresh)(const struct bContext *, struct ARegion *); + /* optional, compute button layout before drawing for dynamic size */ + void (*layout)(const struct bContext *, struct ARegion *); /* snap the size of the region (can be NULL for no snapping). */ int (*snap_size)(const struct ARegion *ar, int size, int axis); /* contextual changes should be handled here */ |