Fix T87749: Fix text jitter in buttons with icons
This patch fixes the remaining issues described in T87749. The jitter was caused by inconsistent rounding when using the floats icon_size and icon_padding to offset the bound for the text drawing. Using `round_fl_to_int` leads to consistent results and fixes the jitter that remained in some buttons with icons, UI lists, and breadcrumbs. Differential Revision: https://developer.blender.org/D11062
This commit is contained in:
parent
fe79935f00
commit
f682812f41
Notes:
blender-bot
2023-02-14 09:21:21 +01:00
Referenced by issue #87749, UI text jitters, when changing region size
|
@ -2416,7 +2416,7 @@ static void widget_draw_text_icon(const uiFontStyle *fstyle,
|
|||
but->block->aspect = aspect_orig;
|
||||
#endif
|
||||
|
||||
rect->xmin += icon_size + icon_padding;
|
||||
rect->xmin += round_fl_to_int(icon_size + icon_padding);
|
||||
}
|
||||
|
||||
if (!no_text_padding) {
|
||||
|
|
Loading…
Reference in New Issue