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:
-rw-r--r--source/blender/editors/interface/interface_widgets.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index f2027d491fb..9e0d34e386d 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -1609,7 +1609,7 @@ static void widget_draw_icon(
else if ((but->flag & (UI_ACTIVE | UI_SELECT | UI_SELECT_DRAW))) {
UI_icon_draw_ex(xs, ys, icon, aspect, alpha, 0.0f, color, has_theme);
}
- else if (!UI_but_is_tool(but)) {
+ else if (!((but->icon != ICON_NONE) && UI_but_is_tool(but))) {
if (has_theme) {
alpha *= 0.8f;
}
@@ -2459,7 +2459,7 @@ static void widget_draw_text_icon(const uiFontStyle *fstyle,
}
/* Icons on the left with optional text label on the right */
else if (but->flag & UI_HAS_ICON || show_menu_icon) {
- const bool is_tool = UI_but_is_tool(but);
+ const bool is_tool = ((but->icon != ICON_NONE) & UI_but_is_tool(but));
/* XXX add way to draw icons at a different size!
* Use small icons for popup. */
@@ -4626,7 +4626,7 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
case UI_BTYPE_BUT:
#ifdef USE_UI_TOOLBAR_HACK
- if (UI_but_is_tool(but)) {
+ if ((but->icon != ICON_NONE) && UI_but_is_tool(but)) {
wt = widget_type(UI_WTYPE_TOOLBAR_ITEM);
}
else {