Testing out going with markdown instead of html.

This commit is contained in:
Veronica K. B. Olsen
2019-04-06 10:25:49 +02:00
parent ec49adadcd
commit 7126e59bc7
7 changed files with 33 additions and 41 deletions
+3 -3
View File
@@ -58,7 +58,7 @@ class GuiDocEditor(QWidget):
# self.guiEditor.setCurrentFont(self.docFont)
# self.guiEditor.setContentsMargins(20,20,20,20)
self.guiEditor.setStyleSheet(
"QTextEdit {background-color: #f0f0f0;};"
"QTextEdit {background-color: #ffffff;};"
)
theDoc = self.guiEditor.document()
theDoc.setDefaultFont(QFont("Source Sans Pro",13))
@@ -84,11 +84,11 @@ class GuiDocEditor(QWidget):
return
def setText(self, docHtml):
self.guiEditor.setHtml(docHtml)
self.guiEditor.setPlainText(docHtml)
return True
def getText(self):
theText = self.guiEditor.toHtml()
theText = self.guiEditor.toPlainText()
return theText
def _buildTabToolBar(self):
+5 -2
View File
@@ -92,7 +92,8 @@ class GuiMain(QMainWindow):
dlgOpt = QFileDialog.Options()
dlgOpt |= QFileDialog.DontUseNativeDialog
projPath, _ = QFileDialog.getOpenFileName(
self,"Open novelWriter Project","","novelWriter Project File (nwProject.nwx);;All Files (*)", options=dlgOpt)
self,"Open novelWriter Project","","novelWriter Project File (nwProject.nwx);;All Files (*)", options=dlgOpt
)
if projPath:
self.theProject.openProject(projPath)
self.treeView.buildTree()
@@ -106,7 +107,8 @@ class GuiMain(QMainWindow):
dlgOpt = QFileDialog.Options()
dlgOpt |= QFileDialog.DontUseNativeDialog
projPath, _ = QFileDialog.getSaveFileName(
self,"Save novelWriter Project","","novelWriter Project File (nwProject.nwx);;All Files (*)", options=dlgOpt)
self,"Save novelWriter Project","","novelWriter Project File (nwProject.nwx);;All Files (*)", options=dlgOpt
)
if projPath:
self.theProject.setProjectPath(projPath)
else:
@@ -160,6 +162,7 @@ class GuiMain(QMainWindow):
logger.info("Exiting %s" % nw.__package__)
self.mainConf.setWinSize(self.width(), self.height())
self.mainConf.setTreeColWidths(self.treeView.getColumnSizes())
print(self.treePane.width())
self.mainConf.saveConfig()
return