Save new config settings and update tests
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user