Save new config settings and update tests

This commit is contained in:
Veronica K. B. Olsen
2020-10-11 19:41:06 +02:00
parent 1234c9feb6
commit 0c0ef6916b
5 changed files with 27 additions and 3 deletions
+16
View File
@@ -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))
+1 -1
View File
@@ -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