Cleanup: use UI_ prefix for block flag

This commit is contained in:
2018-09-11 15:08:08 +10:00
parent bdf215ca82
commit 0117a4c351
4 changed files with 5 additions and 5 deletions

View 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;
}
/**

View 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 {

View 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);

View 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;
}