The fixed width setting should really be maximum width. The text margins should be minimum margins.
This commit is contained in:
+1
-1
@@ -76,7 +76,7 @@ class Config:
|
|||||||
## Text Editor
|
## Text Editor
|
||||||
self.textFont = None
|
self.textFont = None
|
||||||
self.textSize = 12
|
self.textSize = 12
|
||||||
self.textFixedW = False
|
self.textFixedW = True
|
||||||
self.textWidth = 600
|
self.textWidth = 600
|
||||||
self.textMargin = 40
|
self.textMargin = 40
|
||||||
self.tabWidth = 40
|
self.tabWidth = 40
|
||||||
|
|||||||
@@ -322,8 +322,8 @@ class GuiConfigEditEditor(QWidget):
|
|||||||
self.textFlowForm = QGridLayout(self)
|
self.textFlowForm = QGridLayout(self)
|
||||||
self.textFlow.setLayout(self.textFlowForm)
|
self.textFlow.setLayout(self.textFlowForm)
|
||||||
|
|
||||||
self.textFlowFixed = QCheckBox("Fixed width",self)
|
self.textFlowFixed = QCheckBox("Max text width",self)
|
||||||
self.textFlowFixed.setToolTip("Make text in editor fixed width and scale margins instead.")
|
self.textFlowFixed.setToolTip("Maximum width of the text.")
|
||||||
if self.mainConf.textFixedW:
|
if self.mainConf.textFixedW:
|
||||||
self.textFlowFixed.setCheckState(Qt.Checked)
|
self.textFlowFixed.setCheckState(Qt.Checked)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -293,8 +293,8 @@ class GuiDocEditor(QTextEdit):
|
|||||||
tW = self.mainConf.textWidth
|
tW = self.mainConf.textWidth
|
||||||
wW = self.width()
|
wW = self.width()
|
||||||
tM = int((wW - sW - tW)/2)
|
tM = int((wW - sW - tW)/2)
|
||||||
if tM < 0:
|
if tM < self.mainConf.textMargin:
|
||||||
tM = 0
|
tM = self.mainConf.textMargin
|
||||||
docFormat = self.qDocument.rootFrame().frameFormat()
|
docFormat = self.qDocument.rootFrame().frameFormat()
|
||||||
docFormat.setLeftMargin(tM)
|
docFormat.setLeftMargin(tM)
|
||||||
docFormat.setRightMargin(tM)
|
docFormat.setRightMargin(tM)
|
||||||
|
|||||||
Reference in New Issue
Block a user