summaryrefslogtreecommitdiff
path: root/src/ui/documentwidget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r--src/ui/documentwidget.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index e227bcef..0906a1d4 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -571,10 +571,11 @@ static float normScrollPos_DocumentWidget_(const iDocumentWidget *d) {
571} 571}
572 572
573static int scrollMax_DocumentWidget_(const iDocumentWidget *d) { 573static int scrollMax_DocumentWidget_(const iDocumentWidget *d) {
574 int sm = size_GmDocument(d->doc).y - height_Rect(bounds_Widget(constAs_Widget(d))) + 574 const iWidget *w = constAs_Widget(d);
575 int sm = size_GmDocument(d->doc).y - height_Rect(bounds_Widget(w)) +
575 (hasSiteBanner_GmDocument(d->doc) ? 1 : 2) * d->pageMargin * gap_UI; 576 (hasSiteBanner_GmDocument(d->doc) ? 1 : 2) * d->pageMargin * gap_UI;
576 if (d->phoneToolbar) { 577 if (d->phoneToolbar) {
577 sm += size_Root(constAs_Widget(d)->root).y - 578 sm += size_Root(w->root).y -
578 top_Rect(boundsWithoutVisualOffset_Widget(d->phoneToolbar)); 579 top_Rect(boundsWithoutVisualOffset_Widget(d->phoneToolbar));
579 } 580 }
580 return sm; 581 return sm;