From 2e1d5d4d137108ceec22fc3d98d108b8a07eff68 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Sat, 23 Jan 2021 15:11:52 +0100 Subject: [PATCH 1/3] Windows installer for pyz should have a different name than the regular installer --- setup/win_setup_pyz.iss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/win_setup_pyz.iss b/setup/win_setup_pyz.iss index f198bc22..6fdb17ce 100644 --- a/setup/win_setup_pyz.iss +++ b/setup/win_setup_pyz.iss @@ -27,7 +27,7 @@ UsedUserAreasWarning=no ;PrivilegesRequired=lowest PrivilegesRequiredOverridesAllowed=dialog OutputDir={#nwAppDir} -OutputBaseFilename=novelwriter-{#nwAppVersion}-win10-amd64-setup +OutputBaseFilename=novelwriter-{#nwAppVersion}-win10-amd64-pyz-setup Compression=lzma SolidCompression=yes WizardStyle=modern From 1ddadeba5d12a9e074b74fd049989598507a3324 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Sat, 23 Jan 2021 15:12:25 +0100 Subject: [PATCH 2/3] Make the autoscroll feature also work for a very short document --- nw/gui/doceditor.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nw/gui/doceditor.py b/nw/gui/doceditor.py index a06c3035..fae421f4 100644 --- a/nw/gui/doceditor.py +++ b/nw/gui/doceditor.py @@ -454,8 +454,9 @@ class GuiDocEditor(QTextEdit): docChanged = self.docChanged if self.mainConf.scrollPastEnd: + scrlFac = max(1 - self.mainConf.autoScrollPos*0.01, 0.6) docFrame = self.qDocument.rootFrame().frameFormat() - docFrame.setBottomMargin(max(0, 0.6*(wH - uM - lM - 4*tB))) + docFrame.setBottomMargin(max(0, scrlFac*(wH - uM - lM - 4*tB))) self.qDocument.rootFrame().setFrameFormat(docFrame) # This is needed as the setFrameFormat function itself will @@ -847,7 +848,7 @@ class GuiDocEditor(QTextEdit): if okMod and okKey: cNew = self.cursorRect().center().y() cMov = cNew - cOld - mPos = self.mainConf.autoScrollPos * self.viewport().height() * 0.01 + mPos = self.mainConf.autoScrollPos*0.01 * self.viewport().height() if abs(cMov) > 0 and cOld > mPos: # Move the scroll bar vBar = self.verticalScrollBar() From 86fa59e5e1b7cdee90d0d532185998dd0235bac7 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Sat, 23 Jan 2021 15:19:01 +0100 Subject: [PATCH 3/3] Easier to just make the scroll past end feature go to 90% --- nw/gui/doceditor.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nw/gui/doceditor.py b/nw/gui/doceditor.py index fae421f4..c665c6a2 100644 --- a/nw/gui/doceditor.py +++ b/nw/gui/doceditor.py @@ -454,9 +454,8 @@ class GuiDocEditor(QTextEdit): docChanged = self.docChanged if self.mainConf.scrollPastEnd: - scrlFac = max(1 - self.mainConf.autoScrollPos*0.01, 0.6) docFrame = self.qDocument.rootFrame().frameFormat() - docFrame.setBottomMargin(max(0, scrlFac*(wH - uM - lM - 4*tB))) + docFrame.setBottomMargin(max(0, 0.9*(wH - uM - lM - 4*tB))) self.qDocument.rootFrame().setFrameFormat(docFrame) # This is needed as the setFrameFormat function itself will