diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 4d529a847a5..bbc528a0a18 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -968,8 +968,14 @@ static void ui_text_clip_give_next_off(uiBut *but) static void ui_text_clip_left(uiFontStyle *fstyle, uiBut *but, const rcti *rect) { int border = (but->flag & UI_BUT_ALIGN_RIGHT) ? 8 : 10; - int okwidth = max_ii(BLI_rcti_size_x(rect) - border, 0); - if (but->flag & UI_HAS_ICON) okwidth -= UI_DPI_ICON_SIZE; + int okwidth = BLI_rcti_size_x(rect) - border; + + if (but->flag & UI_HAS_ICON) + okwidth -= UI_DPI_ICON_SIZE; + if (but->type == SEARCH_MENU_UNLINK && !but->editstr) + okwidth -= BLI_rcti_size_y(rect); + + okwidth = max_ii(okwidth, 0); /* need to set this first */ uiStyleFontSet(fstyle); @@ -1347,7 +1353,7 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB } /* unlink icon for this button type */ - if (but->type == SEARCH_MENU_UNLINK && but->drawstr[0]) { + if (but->type == SEARCH_MENU_UNLINK && !but->editstr && but->drawstr[0]) { rcti temp = *rect; temp.xmin = temp.xmax - (BLI_rcti_size_y(rect) * 1.08f); |