Fix T92293: Clipped labels for graph editor modifiers
While c7d94a7827a5be9343eea22a9638bb059f185206 exposed this bug, this was caused by a discrepancy in padding where labels would have additional padding when drawing without emboss. The padding made widget drawing behave as if the text took up more room causing it to be clipped. Now labels are considered the same width with/without emboss.
This commit is contained in:
parent
8cecf88dca
commit
5c2330203e
@ -4632,6 +4632,9 @@ void ui_draw_but(const bContext *C, struct ARegion *region, uiStyle *style, uiBu
|
||||
switch (but->type) {
|
||||
case UI_BTYPE_LABEL:
|
||||
wt = widget_type(UI_WTYPE_ICON_LABEL);
|
||||
if (!(but->flag & UI_HAS_ICON)) {
|
||||
but->drawflag |= UI_BUT_NO_TEXT_PADDING;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
wt = widget_type(UI_WTYPE_ICON);
|
||||
|
Loading…
Reference in New Issue
Block a user