summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-03-17 21:32:54 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-03-17 21:32:54 +0200
commit292b81a0a635204fa588a73e352ac8e6ffa98f40 (patch)
treecffe217d8d54820feb3004480c5052899a165044 /src
parent3c95b7e2aed7a405e71d954082ba7d1223a676bf (diff)
DocumentWidget: Blending of side elements
The background of the side title buffer was not using the correct color, causing blending artifacts.
Diffstat (limited to 'src')
-rw-r--r--src/ui/documentwidget.c4
1 files changed, 3 insertions, 1 deletions
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) {
732 if (isValid_Time(&d->sourceTime)) { 732 if (isValid_Time(&d->sourceTime)) {
733 d->timestampBuf = new_TextBuf( 733 d->timestampBuf = new_TextBuf(
734 uiLabel_FontId, 734 uiLabel_FontId,
735 white_ColorId,
735 cstrCollect_String(format_Time(&d->sourceTime, "Received at %I:%M %p\non %b %d, %Y"))); 736 cstrCollect_String(format_Time(&d->sourceTime, "Received at %I:%M %p\non %b %d, %Y")));
736 } 737 }
737} 738}
@@ -3141,7 +3142,8 @@ static void updateSideIconBuf_DocumentWidget_(iDocumentWidget *d) {
3141 iPaint p; 3142 iPaint p;
3142 init_Paint(&p); 3143 init_Paint(&p);
3143 beginTarget_Paint(&p, d->sideIconBuf); 3144 beginTarget_Paint(&p, d->sideIconBuf);
3144 SDL_SetRenderDrawColor(render, 0, 0, 0, 0); 3145 const iColor back = get_Color(tmBannerSideTitle_ColorId);
3146 SDL_SetRenderDrawColor(render, back.r, back.g, back.b, 0); /* better blending of the edge */
3145 SDL_RenderClear(render); 3147 SDL_RenderClear(render);
3146 const iRect iconRect = { zero_I2(), init1_I2(minBannerSize) }; 3148 const iRect iconRect = { zero_I2(), init1_I2(minBannerSize) };
3147 int fg = drawSideRect_(&p, iconRect); 3149 int fg = drawSideRect_(&p, iconRect);