Cleanup: use UI_ prefix for block flag
authorCampbell Barton <ideasman42@gmail.com>
Tue, 11 Sep 2018 05:08:08 +0000 (15:08 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 11 Sep 2018 05:08:08 +0000 (15:08 +1000)
source/blender/editors/interface/interface.c
source/blender/editors/interface/interface_intern.h
source/blender/editors/interface/interface_region_popup.c
source/blender/editors/interface/interface_widgets.c

index 586d6e8efec321acb47edc7535ac6ddb4ec177d4..96f13aad4425966d39d0e8adb99088413841edd5 100644 (file)
@@ -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;
 }
 
 /**
index ee6fc16d8b63fd4ef6e5994c32b9f2cb6d0c4195..350f78609a0b43fed4bdf3563ed290d7320a4046 100644 (file)
@@ -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 {
index 5f379736a7ab8599f82e10c40de568edc97ac93e..b62857983df9a0efe812ad04256f484007f95977 100644 (file)
@@ -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);
index 661de5c344bb943b92c05217e081725c314c7098..dd57a27102f642ff7f0e6304e5da4bab2ff84f6f 100644 (file)
@@ -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;
        }