summaryrefslogtreecommitdiff
path: root/src/ui/documentwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-10-26 19:04:03 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-10-26 19:04:03 +0300
commitdc1f7aac512d4e0bb2e41f65bdcb6c78cc3a3242 (patch)
tree1732fade4309a41b968f35276f4fc41045c4f013 /src/ui/documentwidget.c
parent62c51b650f4ff749de458f99cca5a30312f3b02c (diff)
Cleanup; minor tweaks
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r--src/ui/documentwidget.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index bfb03702..633b72d8 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -934,11 +934,6 @@ static void updateVisible_DocumentWidget_(iDocumentWidget *d) {
934 updateHover_DocumentWidget_(d, mouseCoord_Window(get_Window(), 0)); 934 updateHover_DocumentWidget_(d, mouseCoord_Window(get_Window(), 0));
935 updateSideOpacity_DocumentWidget_(d, iTrue); 935 updateSideOpacity_DocumentWidget_(d, iTrue);
936 animateMedia_DocumentWidget_(d); 936 animateMedia_DocumentWidget_(d);
937 setPos_Banner(d->banner, addY_I2(topLeft_Rect(documentBounds_DocumentWidget_(d)),
938 -pos_SmoothScroll(&d->scrollY)));
939 /*init_I2(documentBounds_DocumentWidget_(d).pos.x,
940 viewPos_DocumentWidget_(d) -
941 documentTopPad_DocumentWidget_(d)));*/
942 /* Remember scroll positions of recently visited pages. */ { 937 /* Remember scroll positions of recently visited pages. */ {
943 iRecentUrl *recent = mostRecentUrl_History(d->mod.history); 938 iRecentUrl *recent = mostRecentUrl_History(d->mod.history);
944 if (recent && docSize && d->state == ready_RequestState) { 939 if (recent && docSize && d->state == ready_RequestState) {
@@ -1137,7 +1132,7 @@ static void updateBanner_DocumentWidget_(iDocumentWidget *d) {
1137} 1132}
1138 1133
1139static void updateTheme_DocumentWidget_(iDocumentWidget *d) { 1134static void updateTheme_DocumentWidget_(iDocumentWidget *d) {
1140 if (category_GmStatusCode(d->sourceStatus) == categoryInput_GmStatusCode) { 1135 if (document_App() != d || category_GmStatusCode(d->sourceStatus) == categoryInput_GmStatusCode) {
1141 return; 1136 return;
1142 } 1137 }
1143 if (equalCase_Rangecc(urlScheme_String(d->mod.url), "file")) { 1138 if (equalCase_Rangecc(urlScheme_String(d->mod.url), "file")) {
@@ -5034,6 +5029,8 @@ static void draw_DocumentWidget_(const iDocumentWidget *d) {
5034 documentTopPad_DocumentWidget_(d)), 5029 documentTopPad_DocumentWidget_(d)),
5035 init_I2(bounds.size.x, documentTopPad_DocumentWidget_(d)) }, 5030 init_I2(bounds.size.x, documentTopPad_DocumentWidget_(d)) },
5036 docBgColor); 5031 docBgColor);
5032 setPos_Banner(d->banner, addY_I2(topLeft_Rect(docBounds),
5033 -pos_SmoothScroll(&d->scrollY)));
5037 draw_Banner(d->banner); 5034 draw_Banner(d->banner);
5038 } 5035 }
5039 const int yBottom = yTop + size_GmDocument(d->doc).y; 5036 const int yBottom = yTop + size_GmDocument(d->doc).y;
@@ -5064,7 +5061,7 @@ static void draw_DocumentWidget_(const iDocumentWidget *d) {
5064 drawSevenSegmentBytes_MediaUI(font, 5061 drawSevenSegmentBytes_MediaUI(font,
5065 add_I2(mid_Rect(bounds), 5062 add_I2(mid_Rect(bounds),
5066 init_I2(sevenSegWidth.x * 4.5f, -sevenSegWidth.y / 2)), 5063 init_I2(sevenSegWidth.x * 4.5f, -sevenSegWidth.y / 2)),
5067 uiTextStrong_ColorId, uiTextDim_ColorId, 5064 tmQuote_ColorId, tmQuoteIcon_ColorId,
5068 bodySize_GmRequest(d->request)); 5065 bodySize_GmRequest(d->request));
5069 } 5066 }
5070 /* Alt text. */ 5067 /* Alt text. */