From ac05b07f106149cca4dceb48130bd343d2750e24 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sun, 16 Jun 2024 15:05:45 +0200 Subject: [PATCH] Add line height formatting to build preview (#1920) --- novelwriter/core/toqdoc.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/novelwriter/core/toqdoc.py b/novelwriter/core/toqdoc.py index fc7d3b46c..493c48981 100644 --- a/novelwriter/core/toqdoc.py +++ b/novelwriter/core/toqdoc.py @@ -136,6 +136,9 @@ def initDocument(self, font: QFont, theme: TextDocumentTheme) -> None: self._blockFmt.setTopMargin(self._mText[0]) self._blockFmt.setBottomMargin(self._mText[1]) self._blockFmt.setAlignment(QtAlignJustify if self._doJustify else QtAlignAbsolute) + self._blockFmt.setLineHeight( + 100*self._lineHeight, QTextBlockFormat.LineHeightTypes.ProportionalHeight + ) # Character Formats # =================