diff options
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r-- | src/ui/documentwidget.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 6d9c3451..f146ed67 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -1079,9 +1079,12 @@ static void drawRun_DrawContext_(void *context, const iGmRun *run) { | |||
1079 | iInt2 bpos = add_I2(visPos, init_I2(0, lineHeight_Text(banner_FontId) / 2)); | 1079 | iInt2 bpos = add_I2(visPos, init_I2(0, lineHeight_Text(banner_FontId) / 2)); |
1080 | if (icon) { | 1080 | if (icon) { |
1081 | format_String(&bannerText, "%lc", (int) icon); | 1081 | format_String(&bannerText, "%lc", (int) icon); |
1082 | const iInt2 iconSize = advanceN_Text(banner_FontId, cstr_String(&bannerText), 2); | 1082 | const iRect iconRect = visualBounds_Text(banner_FontId, range_String(&bannerText)); |
1083 | drawRange_Text(run->font, bpos, tmBannerIcon_ColorId, range_String(&bannerText)); | 1083 | drawRange_Text(run->font, |
1084 | bpos.x += iconSize.x + 3 * gap_Text; | 1084 | addY_I2(bpos, -mid_Rect(iconRect).y + lineHeight_Text(run->font) / 2), |
1085 | tmBannerIcon_ColorId, | ||
1086 | range_String(&bannerText)); | ||
1087 | bpos.x += right_Rect(iconRect) + 3 * gap_Text; | ||
1085 | } | 1088 | } |
1086 | drawRange_Text(run->font, | 1089 | drawRange_Text(run->font, |
1087 | bpos, | 1090 | bpos, |