summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-08-06 21:51:28 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-08-06 21:51:28 +0300
commit7e63a70bc30173d2e15fda77777aef3caf0cc76c (patch)
tree470b981a44d346997a7ed7f33111d2bbfc245efb /src/ui
parent0f47f2f20dd5e6f098f4358cdfea50cf2e87bc56 (diff)
DocumentWidget: Adjusted document borders
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/documentwidget.c8
1 files changed, 6 insertions, 2 deletions
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) {
168 iRect rect; 168 iRect rect;
169 rect.size.x = documentWidth_DocumentWidget_(d); 169 rect.size.x = documentWidth_DocumentWidget_(d);
170 rect.pos.x = bounds.size.x / 2 - rect.size.x / 2; 170 rect.pos.x = bounds.size.x / 2 - rect.size.x / 2;
171 rect.pos.y = top_Rect(bounds) + margin; 171 rect.pos.y = top_Rect(bounds);
172 rect.size.y = height_Rect(bounds) - 2 * margin; 172 rect.size.y = height_Rect(bounds) - margin;
173 if (!hasSiteBanner_GmDocument(d->doc)) {
174 rect.pos.y += margin;
175 rect.size.y -= margin;
176 }
173 iInt2 docSize = addY_I2(size_GmDocument(d->doc), 0 /*-lineHeight_Text(banner_FontId) * 2*/); 177 iInt2 docSize = addY_I2(size_GmDocument(d->doc), 0 /*-lineHeight_Text(banner_FontId) * 2*/);
174 if (docSize.y < rect.size.y) { 178 if (docSize.y < rect.size.y) {
175 /* Center vertically if short. */ 179 /* Center vertically if short. */