Add grey syntax themes and fix automatic update when changing them
This commit is contained in:
@@ -10,7 +10,7 @@ licenseurl = https://creativecommons.org/licenses/by-sa/4.0/
|
|||||||
background = 255, 255, 255
|
background = 255, 255, 255
|
||||||
text = 0, 0, 0
|
text = 0, 0, 0
|
||||||
link = 0, 0, 200
|
link = 0, 0, 200
|
||||||
headertext = 0, 100, 00
|
headertext = 0, 100, 0
|
||||||
headertag = 50, 100, 50
|
headertag = 50, 100, 50
|
||||||
emphasis = 150, 110, 30
|
emphasis = 150, 110, 30
|
||||||
straightquotes = 200, 0, 0
|
straightquotes = 200, 0, 0
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
[Main]
|
||||||
|
name = Grey Dark
|
||||||
|
author = Veronica Berglyd Olsen
|
||||||
|
credit = Veronica Berglyd Olsen
|
||||||
|
url = https://github.com/vkbo/novelWriter
|
||||||
|
license = CC BY-SA 4.0
|
||||||
|
licenseurl = https://creativecommons.org/licenses/by-sa/4.0/
|
||||||
|
|
||||||
|
[Syntax]
|
||||||
|
background = 54, 54, 54
|
||||||
|
text = 200, 200, 200
|
||||||
|
link = 200, 200, 200
|
||||||
|
headertext = 225, 225, 225
|
||||||
|
headertag = 225, 225, 225
|
||||||
|
emphasis = 200, 200, 200
|
||||||
|
straightquotes = 200, 200, 200
|
||||||
|
doublequotes = 200, 200, 200
|
||||||
|
singlequotes = 200, 200, 200
|
||||||
|
hidden = 150, 150, 150
|
||||||
|
keyword = 225, 225, 225
|
||||||
|
value = 200, 200, 200
|
||||||
|
spellcheckline = 200, 46, 0
|
||||||
|
tagerror = 46, 200, 0
|
||||||
|
replacetag = 225, 225, 225
|
||||||
|
modifier = 225, 225, 225
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
[Main]
|
||||||
|
name = Grey Light
|
||||||
|
author = Veronica Berglyd Olsen
|
||||||
|
credit = Veronica Berglyd Olsen
|
||||||
|
url = https://github.com/vkbo/novelWriter
|
||||||
|
license = CC BY-SA 4.0
|
||||||
|
licenseurl = https://creativecommons.org/licenses/by-sa/4.0/
|
||||||
|
|
||||||
|
[Syntax]
|
||||||
|
background = 255, 255, 255
|
||||||
|
text = 20, 20, 20
|
||||||
|
link = 20, 20, 20
|
||||||
|
headertext = 0, 0, 0
|
||||||
|
headertag = 0, 0, 0
|
||||||
|
emphasis = 20, 20, 20
|
||||||
|
straightquotes = 20, 20, 20
|
||||||
|
doublequotes = 20, 20, 20
|
||||||
|
singlequotes = 20, 20, 20
|
||||||
|
hidden = 100, 100, 100
|
||||||
|
keyword = 0, 0, 0
|
||||||
|
value = 20, 20, 20
|
||||||
|
spellcheckline = 200, 0, 0
|
||||||
|
tagerror = 0, 150, 0
|
||||||
|
replacetag = 0, 0, 0
|
||||||
|
modifier = 0, 0, 0
|
||||||
+4
-3
@@ -262,10 +262,10 @@ class GuiDocEditor(QTextEdit):
|
|||||||
# If we have a document open, we should reload it in case the
|
# If we have a document open, we should reload it in case the
|
||||||
# font changed, otherwise we just clear the editor entirely,
|
# font changed, otherwise we just clear the editor entirely,
|
||||||
# which makes it read only.
|
# which makes it read only.
|
||||||
if self.theHandle is not None:
|
if self.theHandle is None:
|
||||||
self.redrawText()
|
|
||||||
else:
|
|
||||||
self.clearEditor()
|
self.clearEditor()
|
||||||
|
else:
|
||||||
|
self.redrawText()
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@@ -355,6 +355,7 @@ class GuiDocEditor(QTextEdit):
|
|||||||
"""Redraw the text by marking the document content as "dirty".
|
"""Redraw the text by marking the document content as "dirty".
|
||||||
"""
|
"""
|
||||||
self.qDocument.markContentsDirty(0, self.qDocument.characterCount())
|
self.qDocument.markContentsDirty(0, self.qDocument.characterCount())
|
||||||
|
self.updateDocMargins()
|
||||||
return
|
return
|
||||||
|
|
||||||
def replaceText(self, theText):
|
def replaceText(self, theText):
|
||||||
|
|||||||
+2
-1
@@ -149,7 +149,7 @@ class GuiDocViewer(QTextBrowser):
|
|||||||
|
|
||||||
# If we have a document open, we should reload it in case the font changed
|
# If we have a document open, we should reload it in case the font changed
|
||||||
if self.theHandle is not None:
|
if self.theHandle is not None:
|
||||||
self.redrawText()
|
self.reloadText()
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@@ -233,6 +233,7 @@ class GuiDocViewer(QTextBrowser):
|
|||||||
"""Redraw the text by marking the document content as "dirty".
|
"""Redraw the text by marking the document content as "dirty".
|
||||||
"""
|
"""
|
||||||
self.qDocument.markContentsDirty(0, self.qDocument.characterCount())
|
self.qDocument.markContentsDirty(0, self.qDocument.characterCount())
|
||||||
|
self.updateDocMargins()
|
||||||
return
|
return
|
||||||
|
|
||||||
def loadFromTag(self, theTag):
|
def loadFromTag(self, theTag):
|
||||||
|
|||||||
Reference in New Issue
Block a user