[Bf-blender-cvs] [0117a4c351e] blender2.8: Cleanup: use UI_ prefix for block flag

Campbell Barton noreply at git.blender.org
Tue Sep 11 06:58:03 CEST 2018


Commit: 0117a4c351e59711eaea314db3315db0a57c01ee
Author: Campbell Barton
Date:   Tue Sep 11 15:08:08 2018 +1000
Branches: blender2.8
https://developer.blender.org/rB0117a4c351e59711eaea314db3315db0a57c01ee

Cleanup: use UI_ prefix for block flag

===================================================================

M	source/blender/editors/interface/interface.c
M	source/blender/editors/interface/interface_intern.h
M	source/blender/editors/interface/interface_region_popup.c
M	source/blender/editors/interface/interface_widgets.c

===================================================================

diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 586d6e8efec..96f13aad442 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -3528,7 +3528,7 @@ static void ui_def_but_rna__menu(bContext *UNUSED(C), uiLayout *layout, void *bu
 static void ui_but_submenu_enable(uiBlock *block, uiBut *but)
 {
 	but->flag |= UI_BUT_ICON_SUBMENU;
-	block->content_hints |= BLOCK_CONTAINS_SUBMENU_BUT;
+	block->content_hints |= UI_BLOCK_CONTAINS_SUBMENU_BUT;
 }
 
 /**
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index ee6fc16d8b6..350f78609a0 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -354,7 +354,7 @@ struct PieMenuData {
 enum eBlockContentHints {
 	/* In a menu block, if there is a single sub-menu button, we add some
 	 * padding to the right to put nicely aligned triangle icons there. */
-	BLOCK_CONTAINS_SUBMENU_BUT = (1 << 0),
+	UI_BLOCK_CONTAINS_SUBMENU_BUT = (1 << 0),
 };
 
 struct uiBlock {
diff --git a/source/blender/editors/interface/interface_region_popup.c b/source/blender/editors/interface/interface_region_popup.c
index 5f379736a7a..b62857983df 100644
--- a/source/blender/editors/interface/interface_region_popup.c
+++ b/source/blender/editors/interface/interface_region_popup.c
@@ -116,7 +116,7 @@ static void ui_popup_block_position(wmWindow *window, ARegion *butregion, uiBut
 			BLI_rctf_init_minmax(&block->rect);
 
 			for (uiBut *bt = block->buttons.first; bt; bt = bt->next) {
-				if (block->content_hints & BLOCK_CONTAINS_SUBMENU_BUT) {
+				if (block->content_hints & UI_BLOCK_CONTAINS_SUBMENU_BUT) {
 					bt->rect.xmax += UI_MENU_SUBMENU_PADDING;
 				}
 				BLI_rctf_union(&block->rect, &bt->rect);
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 661de5c344b..dd57a27102f 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -2089,7 +2089,7 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB
 
 		widget_draw_icon(but, icon, alpha, rect);
 		if (show_menu_icon) {
-			BLI_assert(but->block->content_hints & BLOCK_CONTAINS_SUBMENU_BUT);
+			BLI_assert(but->block->content_hints & UI_BLOCK_CONTAINS_SUBMENU_BUT);
 			widget_draw_submenu_tria(but, rect, wcol);
 		}
 
@@ -2109,7 +2109,7 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB
 
 	/* Menu contains sub-menu items with triangle icon on their right. Shortcut
 	 * strings should be drawn with some padding to the right then. */
-	if (ui_block_is_menu(but->block) && (but->block->content_hints & BLOCK_CONTAINS_SUBMENU_BUT)) {
+	if (ui_block_is_menu(but->block) && (but->block->content_hints & UI_BLOCK_CONTAINS_SUBMENU_BUT)) {
 		rect->xmax -= UI_MENU_SUBMENU_PADDING;
 	}



More information about the Bf-blender-cvs mailing list