Rename tokenizer setFont to setTextFont
This commit is contained in:
@@ -218,7 +218,7 @@ class NWBuildDocument:
|
|||||||
textFont = QFont(CONFIG.textFont)
|
textFont = QFont(CONFIG.textFont)
|
||||||
textFont.fromString(self._build.getStr("format.textFont"))
|
textFont.fromString(self._build.getStr("format.textFont"))
|
||||||
|
|
||||||
bldObj.setFont(textFont)
|
bldObj.setTextFont(textFont)
|
||||||
bldObj.setLanguage(self._project.data.language)
|
bldObj.setLanguage(self._project.data.language)
|
||||||
|
|
||||||
bldObj.setPartitionFormat(
|
bldObj.setPartitionFormat(
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ class Tokenizer(ABC):
|
|||||||
self._sceneStyle |= BlockFmt.PBB if pageBreak else BlockFmt.NONE
|
self._sceneStyle |= BlockFmt.PBB if pageBreak else BlockFmt.NONE
|
||||||
return
|
return
|
||||||
|
|
||||||
def setFont(self, font: QFont) -> None:
|
def setTextFont(self, font: QFont) -> None:
|
||||||
"""Set the build font."""
|
"""Set the build font."""
|
||||||
self._textFont = font
|
self._textFont = font
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ class GuiDocViewer(QTextBrowser):
|
|||||||
qDoc = ToQTextDocument(SHARED.project)
|
qDoc = ToQTextDocument(SHARED.project)
|
||||||
qDoc.setJustify(CONFIG.doJustify)
|
qDoc.setJustify(CONFIG.doJustify)
|
||||||
qDoc.setDialogHighlight(True)
|
qDoc.setDialogHighlight(True)
|
||||||
qDoc.setFont(CONFIG.textFont)
|
qDoc.setTextFont(CONFIG.textFont)
|
||||||
qDoc.setTheme(self._docTheme)
|
qDoc.setTheme(self._docTheme)
|
||||||
qDoc.initDocument()
|
qDoc.initDocument()
|
||||||
qDoc.setKeywords(True)
|
qDoc.setKeywords(True)
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ def testFmtToken_Setters(mockGUI):
|
|||||||
tokens.setSceneFormat(f"S: {nwHeadFmt.TITLE}", True)
|
tokens.setSceneFormat(f"S: {nwHeadFmt.TITLE}", True)
|
||||||
tokens.setHardSceneFormat(f"H: {nwHeadFmt.TITLE}", True)
|
tokens.setHardSceneFormat(f"H: {nwHeadFmt.TITLE}", True)
|
||||||
tokens.setSectionFormat(f"X: {nwHeadFmt.TITLE}", True)
|
tokens.setSectionFormat(f"X: {nwHeadFmt.TITLE}", True)
|
||||||
tokens.setFont(QFont("Monospace", 10))
|
tokens.setTextFont(QFont("Monospace", 10))
|
||||||
tokens.setLineHeight(2.0)
|
tokens.setLineHeight(2.0)
|
||||||
tokens.setBlockIndent(6.0)
|
tokens.setBlockIndent(6.0)
|
||||||
tokens.setJustify(True)
|
tokens.setJustify(True)
|
||||||
|
|||||||
Reference in New Issue
Block a user