diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-10-25 14:27:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-10-25 14:28:06 +0300 |
commit | 5c2330203e11e0d916960218b07d88d2193bf526 (patch) | |
tree | 4be96b16f7fe5c80805c52fa15c2b8150f39c114 /source/blender/editors | |
parent | 8cecf88dcaa82560d6849e2532a3e84b459ef19f (diff) |
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.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index e9acc65ed37..61d66c44a39 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -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); |