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:
authorGeorge Vogiatzis <Gvgeo>2019-04-05 14:48:26 +0300
committerJacques Lucke <mail@jlucke.com>2019-04-05 14:48:26 +0300
commita180b754eb40637a5d37eeb0ae60066f5a6f93d8 (patch)
tree3871e253a8f3b861b27dfd3f666535adffc606b0 /source/blender/editors/interface/interface_region_menu_popup.c
parentfce469a30c5075216671f9ce3738ed401ad9c03f (diff)
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
Diffstat (limited to 'source/blender/editors/interface/interface_region_menu_popup.c')
-rw-r--r--source/blender/editors/interface/interface_region_menu_popup.c18
1 files changed, 13 insertions, 5 deletions
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);
+ }
}
}
}