summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-11-06 06:21:31 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-11-06 06:21:31 +0200
commite29319f743e7fa24911db7df9c1cb8e5b401b6e3 (patch)
treeba9f383c9a5261aa68831a6df2f57ab0e383f495 /src
parent85cdf58f7e24d209dcf8457b698731001e32e24f (diff)
DocumentWidget: Fixed incorrect document width
Diffstat (limited to 'src')
-rw-r--r--src/ui/documentwidget.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 8c24d4a9..60662b03 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -1107,12 +1107,11 @@ static void documentWasChanged_DocumentWidget_(iDocumentWidget *d) {
1107 1107
1108void setSource_DocumentWidget(iDocumentWidget *d, const iString *source) { 1108void setSource_DocumentWidget(iDocumentWidget *d, const iString *source) {
1109 setUrl_GmDocument(d->doc, d->mod.url); 1109 setUrl_GmDocument(d->doc, d->mod.url);
1110 const int docWidth = documentWidth_DocumentWidget_(d); 1110 const int docWidth = documentWidth_DocumentWidget_(d);
1111 const int outsideMargin = (width_Widget(d) - docWidth) / 2;
1112 setSource_GmDocument(d->doc, 1111 setSource_GmDocument(d->doc,
1113 source, 1112 source,
1114 docWidth, 1113 docWidth,
1115 outsideMargin, 1114 width_Widget(d),
1116 isFinished_GmRequest(d->request) ? final_GmDocumentUpdate 1115 isFinished_GmRequest(d->request) ? final_GmDocumentUpdate
1117 : partial_GmDocumentUpdate); 1116 : partial_GmDocumentUpdate);
1118 setWidth_Banner(d->banner, docWidth); 1117 setWidth_Banner(d->banner, docWidth);