diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-10-26 19:04:03 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-10-26 19:04:03 +0300 |
commit | dc1f7aac512d4e0bb2e41f65bdcb6c78cc3a3242 (patch) | |
tree | 1732fade4309a41b968f35276f4fc41045c4f013 /src | |
parent | 62c51b650f4ff749de458f99cca5a30312f3b02c (diff) |
Cleanup; minor tweaks
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/documentwidget.c | 11 | ||||
-rw-r--r-- | src/ui/sidebarwidget.c | 4 |
2 files changed, 4 insertions, 11 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 | ||
1139 | static void updateTheme_DocumentWidget_(iDocumentWidget *d) { | 1134 | static 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. */ |
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index 821f8118..4b6fde3c 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c | |||
@@ -987,10 +987,6 @@ void setWidth_SidebarWidget(iSidebarWidget *d, float widthAsGaps) { | |||
987 | arrange_Widget(findWidget_Root("stack")); | 987 | arrange_Widget(findWidget_Root("stack")); |
988 | checkModeButtonLayout_SidebarWidget_(d); | 988 | checkModeButtonLayout_SidebarWidget_(d); |
989 | updateItemHeight_SidebarWidget_(d); | 989 | updateItemHeight_SidebarWidget_(d); |
990 | if (!isFixedWidth && !isRefreshPending_App()) { | ||
991 | updateSize_DocumentWidget(document_App()); | ||
992 | invalidate_ListWidget(d->list); | ||
993 | } | ||
994 | } | 990 | } |
995 | 991 | ||
996 | iBool handleBookmarkEditorCommands_SidebarWidget_(iWidget *editor, const char *cmd) { | 992 | iBool handleBookmarkEditorCommands_SidebarWidget_(iWidget *editor, const char *cmd) { |