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:
authorJulian Eisel <eiseljulian@gmail.com>2018-10-29 23:20:58 +0300
committerJulian Eisel <eiseljulian@gmail.com>2018-10-29 23:20:58 +0300
commitce148716c8163162ba7275980792d432c0b3f5ed (patch)
treed642821bd70c29a633a0381dbedfbd27a1f213aa /source/blender/editors/interface/interface_templates.c
parenta0dfa320cddd8396911058bae7c3a0eb52e7f2ee (diff)
UI: Support Displaying Enums as Tabs
Adds `uiLayout.prop_tabs_enum(data, property, icon_only)` to BPY.
Diffstat (limited to 'source/blender/editors/interface/interface_templates.c')
-rw-r--r--source/blender/editors/interface/interface_templates.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 3cbfd1eb05e..8a1ebbb205c 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -847,7 +847,7 @@ static void template_ID_tabs(
const PointerRNA active_ptr = RNA_property_pointer_get(&template->ptr, template->prop);
MenuType *mt = WM_menutype_find(menu, false);
- const int but_align = (region->alignment == RGN_ALIGN_TOP) ? UI_BUT_ALIGN_DOWN : UI_BUT_ALIGN_TOP;
+ const int but_align = ui_but_align_opposite_to_area_align_get(region);
const int but_height = UI_UNIT_Y * 1.1;
uiBlock *block = uiLayoutGetBlock(layout);