summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-10-29 14:18:48 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-10-29 14:18:48 +0200
commit8ca6416a76aa6877f36cdf83e7c0d7e7516750ac (patch)
treeb8df3c656eeb7022b8f24429caa7ed0ba2a4d122 /src
parentfb1f00a96c02f5a85f35e4d96102f8e1f8af7ee6 (diff)
DocumentWidget: Clear buffered icon/heading
Diffstat (limited to 'src')
-rw-r--r--src/ui/documentwidget.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index fa375969..5c6780d1 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -2404,13 +2404,16 @@ static void updateSideIconBuf_DocumentWidget_(iDocumentWidget *d) {
2404 isHeadingVisible = iFalse; 2404 isHeadingVisible = iFalse;
2405 } 2405 }
2406 } 2406 }
2407 d->sideIconBuf = SDL_CreateTexture(renderer_Window(get_Window()), 2407 SDL_Renderer *render = renderer_Window(get_Window());
2408 d->sideIconBuf = SDL_CreateTexture(render,
2408 SDL_PIXELFORMAT_RGBA4444, 2409 SDL_PIXELFORMAT_RGBA4444,
2409 SDL_TEXTUREACCESS_STATIC | SDL_TEXTUREACCESS_TARGET, 2410 SDL_TEXTUREACCESS_STATIC | SDL_TEXTUREACCESS_TARGET,
2410 bufSize.x, bufSize.y); 2411 bufSize.x, bufSize.y);
2411 iPaint p; 2412 iPaint p;
2412 init_Paint(&p); 2413 init_Paint(&p);
2413 beginTarget_Paint(&p, d->sideIconBuf); 2414 beginTarget_Paint(&p, d->sideIconBuf);
2415 SDL_SetRenderDrawColor(render, 0, 0, 0, 0);
2416 SDL_RenderClear(render);
2414 const iRect iconRect = { zero_I2(), init1_I2(minBannerSize) }; 2417 const iRect iconRect = { zero_I2(), init1_I2(minBannerSize) };
2415 int fg = drawSideRect_(&p, iconRect); 2418 int fg = drawSideRect_(&p, iconRect);
2416 iString str; 2419 iString str;