From a180b754eb40637a5d37eeb0ae60066f5a6f93d8 Mon Sep 17 00:00:00 2001 From: George Vogiatzis Date: Fri, 5 Apr 2019 13:48:26 +0200 Subject: Interface: New region type 'Footer', used by text editor * It can be hidden by dragging it up/down. * It can be at the top or bottom, independent of the header. * It uses the color theme from the header. * It does not change its color, when the area becomes active. Currently, it is used in the text editor to display the file path. Differential Revision: https://developer.blender.org/D4601 --- .../editors/interface/interface_region_menu_popup.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'source/blender/editors/interface/interface_region_menu_popup.c') diff --git a/source/blender/editors/interface/interface_region_menu_popup.c b/source/blender/editors/interface/interface_region_menu_popup.c index a20c4fe9379..0fe847caa20 100644 --- a/source/blender/editors/interface/interface_region_menu_popup.c +++ b/source/blender/editors/interface/interface_region_menu_popup.c @@ -278,11 +278,19 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi /* for a header menu we set the direction automatic */ if (!pup->slideout && flip) { ScrArea *sa = CTX_wm_area(C); - if (sa && ED_area_header_alignment(sa) == RGN_ALIGN_BOTTOM) { - ARegion *ar = CTX_wm_region(C); - if (ar && ar->regiontype == RGN_TYPE_HEADER) { - UI_block_direction_set(block, UI_DIR_UP); - UI_block_order_flip(block); + ARegion *ar = CTX_wm_region(C); + if (sa && ar) { + if (ar->regiontype == RGN_TYPE_HEADER) { + if (ED_area_header_alignment(sa) == RGN_ALIGN_BOTTOM) { + UI_block_direction_set(block, UI_DIR_UP); + UI_block_order_flip(block); + } + } + if (ar->regiontype == RGN_TYPE_FOOTER) { + if (ED_area_footer_alignment(sa) == RGN_ALIGN_BOTTOM) { + UI_block_direction_set(block, UI_DIR_UP); + UI_block_order_flip(block); + } } } } -- cgit v1.2.3