From 9c75ed5b06c69239d9b52e34e1f9f8e61dd827ed Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Sun, 11 Oct 2020 21:39:42 +0200 Subject: [PATCH] Leave scroll bar on build tool document, and don't scroll too far past end in doc editor --- nw/gui/build.py | 11 ----------- nw/gui/doceditor.py | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/nw/gui/build.py b/nw/gui/build.py index 754553d8..37880cca 100644 --- a/nw/gui/build.py +++ b/nw/gui/build.py @@ -1124,17 +1124,6 @@ class GuiBuildNovelDocView(QTextBrowser): else: self.setTabStopWidth(self.mainConf.getTabWidth()) - # Scroll bars - if self.mainConf.hideVScroll: - self.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff) - else: - self.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded) - - if self.mainConf.hideHScroll: - self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff) - else: - self.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded) - docPalette = self.palette() docPalette.setColor(QPalette.Base, QColor(255, 255, 255)) docPalette.setColor(QPalette.Text, QColor(0, 0, 0)) diff --git a/nw/gui/doceditor.py b/nw/gui/doceditor.py index d65c89df..99e86764 100644 --- a/nw/gui/doceditor.py +++ b/nw/gui/doceditor.py @@ -440,7 +440,7 @@ class GuiDocEditor(QTextEdit): if self.mainConf.scrollPastEnd: docFrame = self.qDocument.rootFrame().frameFormat() - docFrame.setBottomMargin(wH - uM - lM - 4*tB - self.theTheme.fontPixelSize) + docFrame.setBottomMargin(wH - uM - lM - 5*self.theTheme.fontPixelSize) self.qDocument.rootFrame().setFrameFormat(docFrame) return