summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-05-12 09:05:07 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-05-12 09:05:07 +0300
commit892d8dedc46713ddf916e82405f06fc2c9c46ae4 (patch)
tree25f5c955a7e0c974870fed6ec01eeb6fd09fc92a /src
parent9e462a6b231207104b5733457adfc09c2faf80ff (diff)
DocumentWidget: Clean up drawing
Children drawn were twice?
Diffstat (limited to 'src')
-rw-r--r--src/ui/documentwidget.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 0314757f..f90733f5 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -304,7 +304,7 @@ void init_DocumentWidget(iDocumentWidget *d) {
304 iWidget *w = as_Widget(d); 304 iWidget *w = as_Widget(d);
305 init_Widget(w); 305 init_Widget(w);
306 setId_Widget(w, format_CStr("document%03d", ++docEnum_)); 306 setId_Widget(w, format_CStr("document%03d", ++docEnum_));
307 setFlags_Widget(w, hover_WidgetFlag, iTrue); 307 setFlags_Widget(w, hover_WidgetFlag | noBackground_WidgetFlag, iTrue);
308 init_PersistentDocumentState(&d->mod); 308 init_PersistentDocumentState(&d->mod);
309 d->flags = 0; 309 d->flags = 0;
310 d->phoneToolbar = NULL; 310 d->phoneToolbar = NULL;
@@ -1576,13 +1576,16 @@ static void checkResponse_DocumentWidget_(iDocumentWidget *d) {
1576 isEmpty_String(&resp->meta) 1576 isEmpty_String(&resp->meta)
1577 ? format_CStr(cstr_Lang("dlg.input.prompt"), cstr_Rangecc(parts.path)) 1577 ? format_CStr(cstr_Lang("dlg.input.prompt"), cstr_Rangecc(parts.path))
1578 : cstr_String(&resp->meta), 1578 : cstr_String(&resp->meta),
1579 uiTextCaution_ColorEscape "${dlg.input.send} \u21d2", 1579 uiTextCaution_ColorEscape "\u21d2 ${dlg.input.send}",
1580 format_CStr("!document.input.submit doc:%p", d)); 1580 format_CStr("!document.input.submit doc:%p", d));
1581 setSensitiveContent_InputWidget(findChild_Widget(dlg, "input"), 1581 setSensitiveContent_InputWidget(findChild_Widget(dlg, "input"),
1582 statusCode == sensitiveInput_GmStatusCode); 1582 statusCode == sensitiveInput_GmStatusCode);
1583 if (document_App() != d) { 1583 if (document_App() != d) {
1584 postCommandf_App("tabs.switch page:%p", d); 1584 postCommandf_App("tabs.switch page:%p", d);
1585 } 1585 }
1586 else {
1587 updateTheme_DocumentWidget_(d);
1588 }
1586 break; 1589 break;
1587 } 1590 }
1588 case categorySuccess_GmStatusCode: 1591 case categorySuccess_GmStatusCode:
@@ -4148,7 +4151,7 @@ static void draw_DocumentWidget_(const iDocumentWidget *d) {
4148 if (width_Rect(bounds) <= 0) { 4151 if (width_Rect(bounds) <= 0) {
4149 return; 4152 return;
4150 } 4153 }
4151 draw_Widget(w); 4154// draw_Widget(w);
4152 if (d->drawBufs->flags & updateTimestampBuf_DrawBufsFlag) { 4155 if (d->drawBufs->flags & updateTimestampBuf_DrawBufsFlag) {
4153 updateTimestampBuf_DocumentWidget_(d); 4156 updateTimestampBuf_DocumentWidget_(d);
4154 } 4157 }
@@ -4226,7 +4229,7 @@ static void draw_DocumentWidget_(const iDocumentWidget *d) {
4226 if (colorTheme_App() == pureWhite_ColorTheme) { 4229 if (colorTheme_App() == pureWhite_ColorTheme) {
4227 drawHLine_Paint(&ctx.paint, topLeft_Rect(bounds), width_Rect(bounds), uiSeparator_ColorId); 4230 drawHLine_Paint(&ctx.paint, topLeft_Rect(bounds), width_Rect(bounds), uiSeparator_ColorId);
4228 } 4231 }
4229 draw_Widget(w); 4232 drawChildren_Widget(w);
4230 /* Alt text. */ 4233 /* Alt text. */
4231 const float altTextOpacity = value_Anim(&d->altTextOpacity) * 6 - 5; 4234 const float altTextOpacity = value_Anim(&d->altTextOpacity) * 6 - 5;
4232 if (d->hoverAltPre && altTextOpacity > 0) { 4235 if (d->hoverAltPre && altTextOpacity > 0) {