Merge branch 'master' into blender2.8
[blender.git] / source / blender / editors / interface / interface_widgets.c
index 2296c3bc39ddfa4fbb956ef36b49d1684a8d903e..004cdeb8d53209e5f814cdbbe7a324f8677c9d22 100644 (file)
@@ -4088,7 +4088,7 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
                                        wt->wcol_theme = &tui->wcol_box;
                                        wt->state = widget_state;
                                }
-                               else if (but->block->flag & UI_BLOCK_LOOP) {
+                               else if (but->block->theme_style == UI_BLOCK_THEME_STYLE_POPUP) {
                                        wt->wcol_theme = &tui->wcol_menu_back;
                                        wt->state = widget_state;
                                }
@@ -4134,8 +4134,9 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
 
                        case UI_BTYPE_SEARCH_MENU:
                                wt = widget_type(UI_WTYPE_NAME);
-                               if (but->block->flag & UI_BLOCK_LOOP)
+                               if (but->block->theme_style == UI_BLOCK_THEME_STYLE_POPUP) {
                                        wt->wcol_theme = &btheme->tui.wcol_menu_back;
+                               }
                                break;
 
                        case UI_BTYPE_TAB:
@@ -4158,9 +4159,9 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
                                        wt = widget_type(UI_WTYPE_TOGGLE);
 
                                /* option buttons have strings outside, on menus use different colors */
-                               if (but->block->flag & UI_BLOCK_LOOP)
+                               if (but->block->theme_style == UI_BLOCK_THEME_STYLE_POPUP) {
                                        wt->state = widget_state_option_menu;
-
+                               }
                                break;
 
                        case UI_BTYPE_MENU: