From 7e63a70bc30173d2e15fda77777aef3caf0cc76c Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Thu, 6 Aug 2020 21:51:28 +0300 Subject: DocumentWidget: Adjusted document borders --- src/ui/documentwidget.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/ui') diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 3455db64..6d9c3451 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c @@ -168,8 +168,12 @@ static iRect documentBounds_DocumentWidget_(const iDocumentWidget *d) { iRect rect; rect.size.x = documentWidth_DocumentWidget_(d); rect.pos.x = bounds.size.x / 2 - rect.size.x / 2; - rect.pos.y = top_Rect(bounds) + margin; - rect.size.y = height_Rect(bounds) - 2 * margin; + rect.pos.y = top_Rect(bounds); + rect.size.y = height_Rect(bounds) - margin; + if (!hasSiteBanner_GmDocument(d->doc)) { + rect.pos.y += margin; + rect.size.y -= margin; + } iInt2 docSize = addY_I2(size_GmDocument(d->doc), 0 /*-lineHeight_Text(banner_FontId) * 2*/); if (docSize.y < rect.size.y) { /* Center vertically if short. */ -- cgit v1.2.3