diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2018-06-11 15:33:53 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-06-11 15:46:35 +0300 |
commit | d90fc119c204c760c4c8dcb269706c82bf51ca4b (patch) | |
tree | 33059e9bac58118019502a337b1a6436ace6d1c3 /source/blender/editors/interface/interface_align.c | |
parent | 74051111eb2b0a0453d497018c48b0f33cfa8db7 (diff) |
UI: Separator spacer
This support layout.separator_spacer() to be used by headers as a way to
dynamically separate the ui buttons.
Right now no UI file is changed, though we can use this right away in the
timeline, and shortly after in the viewport header (moving settings from
the topbar to it).
Original design by William Reynish.
Review: Campbell Barton
D3468
Diffstat (limited to 'source/blender/editors/interface/interface_align.c')
-rw-r--r-- | source/blender/editors/interface/interface_align.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_align.c b/source/blender/editors/interface/interface_align.c index 619dce1b9d9..c945746c2df 100644 --- a/source/blender/editors/interface/interface_align.c +++ b/source/blender/editors/interface/interface_align.c @@ -111,7 +111,7 @@ enum { bool ui_but_can_align(const uiBut *but) { const bool btype_can_align = !ELEM(but->type, UI_BTYPE_LABEL, UI_BTYPE_CHECKBOX, UI_BTYPE_CHECKBOX_N, - UI_BTYPE_TAB, UI_BTYPE_SEPR, UI_BTYPE_SEPR_LINE); + UI_BTYPE_TAB, UI_BTYPE_SEPR, UI_BTYPE_SEPR_LINE, UI_BTYPE_SEPR_SPACER); return (btype_can_align && (BLI_rctf_size_x(&but->rect) > 0.0f) && (BLI_rctf_size_y(&but->rect) > 0.0f)); } @@ -499,7 +499,8 @@ void ui_block_align_calc(uiBlock *block, const ARegion *region) bool ui_but_can_align(uiBut *but) { - return !ELEM(but->type, UI_BTYPE_LABEL, UI_BTYPE_CHECKBOX, UI_BTYPE_CHECKBOX_N, UI_BTYPE_SEPR, UI_BTYPE_SEPR_LINE); + return !ELEM(but->type, UI_BTYPE_LABEL, UI_BTYPE_CHECKBOX, UI_BTYPE_CHECKBOX_N, + UI_BTYPE_SEPR, UI_BTYPE_SEPR_LINE, UI_BTYPE_SEPR_SPACER); } static bool buts_are_horiz(uiBut *but1, uiBut *but2) |