From 292b81a0a635204fa588a73e352ac8e6ffa98f40 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Wed, 17 Mar 2021 21:32:54 +0200 Subject: DocumentWidget: Blending of side elements The background of the side title buffer was not using the correct color, causing blending artifacts. --- src/ui/documentwidget.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/ui/documentwidget.c') diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 02358597..592470eb 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c @@ -732,6 +732,7 @@ static void updateTimestampBuf_DocumentWidget_(iDocumentWidget *d) { if (isValid_Time(&d->sourceTime)) { d->timestampBuf = new_TextBuf( uiLabel_FontId, + white_ColorId, cstrCollect_String(format_Time(&d->sourceTime, "Received at %I:%M %p\non %b %d, %Y"))); } } @@ -3141,7 +3142,8 @@ static void updateSideIconBuf_DocumentWidget_(iDocumentWidget *d) { iPaint p; init_Paint(&p); beginTarget_Paint(&p, d->sideIconBuf); - SDL_SetRenderDrawColor(render, 0, 0, 0, 0); + const iColor back = get_Color(tmBannerSideTitle_ColorId); + SDL_SetRenderDrawColor(render, back.r, back.g, back.b, 0); /* better blending of the edge */ SDL_RenderClear(render); const iRect iconRect = { zero_I2(), init1_I2(minBannerSize) }; int fg = drawSideRect_(&p, iconRect); -- cgit v1.2.3