diff --git a/nw/config.py b/nw/config.py index 88576502..5ed12655 100644 --- a/nw/config.py +++ b/nw/config.py @@ -398,6 +398,12 @@ class Config: self.isFullScreen = self._parseLine( cnfParse, cnfSec, "fullscreen", self.CNF_BOOL, self.isFullScreen ) + self.hideVScroll = self._parseLine( + cnfParse, cnfSec, "hidevscroll", self.CNF_BOOL, self.hideVScroll + ) + self.hideHScroll = self._parseLine( + cnfParse, cnfSec, "hidehscroll", self.CNF_BOOL, self.hideHScroll + ) ## Project cnfSec = "Project" @@ -455,6 +461,12 @@ class Config: self.doReplaceDots = self._parseLine( cnfParse, cnfSec, "repdots", self.CNF_BOOL, self.doReplaceDots ) + self.scrollPastEnd = self._parseLine( + cnfParse, cnfSec, "scrollpastend", self.CNF_BOOL, self.scrollPastEnd + ) + self.scollWithCursor = self._parseLine( + cnfParse, cnfSec, "scollwithcursor", self.CNF_BOOL, self.scollWithCursor + ) self.fmtSingleQuotes = self._parseLine( cnfParse, cnfSec, "fmtsinglequote", self.CNF_LIST, self.fmtSingleQuotes ) @@ -572,6 +584,8 @@ class Config: cnfParse.set(cnfSec, "viewpane", self._packList(self.viewPanePos)) cnfParse.set(cnfSec, "outlinepane", self._packList(self.outlnPanePos)) cnfParse.set(cnfSec, "fullscreen", str(self.isFullScreen)) + cnfParse.set(cnfSec, "hidevscroll", str(self.hideVScroll)) + cnfParse.set(cnfSec, "hidehscroll", str(self.hideHScroll)) ## Project cnfSec = "Project" @@ -597,6 +611,8 @@ class Config: cnfParse.set(cnfSec, "repdquotes", str(self.doReplaceDQuote)) cnfParse.set(cnfSec, "repdash", str(self.doReplaceDash)) cnfParse.set(cnfSec, "repdots", str(self.doReplaceDots)) + cnfParse.set(cnfSec, "scrollpastend", str(self.scrollPastEnd)) + cnfParse.set(cnfSec, "scollwithcursor", str(self.scollWithCursor)) cnfParse.set(cnfSec, "fmtsinglequote", self._packList(self.fmtSingleQuotes)) cnfParse.set(cnfSec, "fmtdoublequote", self._packList(self.fmtDoubleQuotes)) cnfParse.set(cnfSec, "spelltool", str(self.spellTool)) diff --git a/nw/gui/doceditor.py b/nw/gui/doceditor.py index f4c87d9b..fe9581e9 100644 --- a/nw/gui/doceditor.py +++ b/nw/gui/doceditor.py @@ -430,7 +430,7 @@ class GuiDocEditor(QTextEdit): if self.mainConf.scrollPastEnd: docFrame = self.qDocument.rootFrame().frameFormat() - docFrame.setBottomMargin(wH - uM - lM - self.theTheme.fontPixelSize) + docFrame.setBottomMargin(wH - uM - lM - 4*tB - self.theTheme.fontPixelSize) self.qDocument.rootFrame().setFrameFormat(docFrame) return diff --git a/tests/reference/novelwriter.conf b/tests/reference/novelwriter.conf index 49054ae7..f4bc8d61 100644 --- a/tests/reference/novelwriter.conf +++ b/tests/reference/novelwriter.conf @@ -1,5 +1,5 @@ [Main] -timestamp = 2020-06-29 17:34:15 +timestamp = 2020-10-11 18:29:34 theme = default syntax = default_light icons = typicons_colour_light @@ -16,6 +16,8 @@ docpane = 400, 400 viewpane = 500, 150 outlinepane = 500, 150 fullscreen = False +hidevscroll = False +hidehscroll = False [Project] autosaveproject = 60 @@ -37,6 +39,8 @@ repsquotes = True repdquotes = True repdash = True repdots = True +scrollpastend = True +scollwithcursor = False fmtsinglequote = ‘, ’ fmtdoublequote = “, ” spelltool = internal diff --git a/tests/reference/novelwriter_prefs.conf b/tests/reference/novelwriter_prefs.conf index 608116ea..77e216bd 100644 --- a/tests/reference/novelwriter_prefs.conf +++ b/tests/reference/novelwriter_prefs.conf @@ -16,6 +16,8 @@ docpane = 400, 400 viewpane = 500, 150 outlinepane = 500, 150 fullscreen = False +hidevscroll = False +hidehscroll = False [Project] autosaveproject = 40 @@ -37,6 +39,8 @@ repsquotes = True repdquotes = True repdash = True repdots = True +scrollpastend = True +scollwithcursor = False fmtsinglequote = ‘, ’ fmtdoublequote = “, ” spelltool = internal diff --git a/tests/test_dialogs.py b/tests/test_dialogs.py index 9d05f56f..11d0cd05 100644 --- a/tests/test_dialogs.py +++ b/tests/test_dialogs.py @@ -1198,7 +1198,7 @@ def testPreferences(qtbot, monkeypatch, yesToAll, nwMinimal, nwTemp, nwRef, tmpC ignoreLines = [ 2, # Timestamp 11, 12, 13, 14, 15, 16, 17, # Window sizes - 7, 25, # Fonts (depends on system default) + 7, 27, # Fonts (depends on system default) ] assert cmpFiles(testConf, refConf, ignoreLines)