SOme cleanup of code in config, and added tab width option

This commit is contained in:
Veronica K. B. Olsen
2019-05-25 22:01:59 +02:00
parent 93f9b37587
commit 3cbea6eff2
2 changed files with 97 additions and 103 deletions
+5 -1
View File
@@ -104,8 +104,12 @@ class GuiDocEditor(QTextEdit):
mTB = self.mainConf.textMargin[0]
mLR = self.mainConf.textMargin[1]
self.setViewportMargins(mLR,mTB,mLR,mTB)
theOpt = QTextOption()
if self.mainConf.tabWidth >= 0:
theOpt.setTabStopDistance(self.mainConf.tabWidth)
if self.mainConf.doJustify:
self.theDoc.setDefaultTextOption(QTextOption(Qt.AlignJustify))
theOpt.setAlignment(Qt.AlignJustify)
self.theDoc.setDefaultTextOption(theOpt)
return True
##