diff --git a/nw/gui/doceditor.py b/nw/gui/doceditor.py index befc6c9d..c8d13477 100644 --- a/nw/gui/doceditor.py +++ b/nw/gui/doceditor.py @@ -17,7 +17,7 @@ from time import time from PyQt5.QtCore import Qt, QTimer, QSizeF from PyQt5.QtWidgets import QTextEdit, QAction, QMenu, QShortcut -from PyQt5.QtGui import QTextCursor, QTextOption, QIcon, QKeySequence, QFont +from PyQt5.QtGui import QTextCursor, QTextOption, QIcon, QKeySequence, QFont, QColor, QPalette from nw.project.document import NWDoc from nw.gui.dochighlight import GuiDocHighlighter @@ -37,8 +37,9 @@ class GuiDocEditor(QTextEdit): # Class Variables self.mainConf = nw.CONFIG - self.theParent = theParent self.theProject = theProject + self.theParent = theParent + self.theTheme = theParent.theTheme self.docChanged = False self.spellCheck = False self.nwDocument = NWDoc(self.theProject, self.theParent) @@ -132,6 +133,11 @@ class GuiDocEditor(QTextEdit): theFont.setPointSize(self.mainConf.textSize) self.setFont(theFont) + docPalette = self.palette() + docPalette.setColor(QPalette.Base, QColor(*self.theTheme.colBack)) + docPalette.setColor(QPalette.Text, QColor(*self.theTheme.colText)) + self.setPalette(docPalette) + # Set text fixed width, or alternatively, just margins self.qDocument.setDocumentMargin(self.mainConf.textMargin) @@ -249,11 +255,11 @@ class GuiDocEditor(QTextEdit): tM = int((wW - sW - tW)/2) if tM < 0: tM = 0 - # print(wW, tW, dW, sW, tM) - self.setViewportMargins(tM,0,tM,0) - self.qDocument.setTextWidth(tW) - else: - self.setViewportMargins(0,0,0,0) + docFormat = self.qDocument.rootFrame().frameFormat() + docFormat.setLeftMargin(tM) + docFormat.setRightMargin(tM) + self.qDocument.rootFrame().setFrameFormat(docFormat) + return def docAction(self, theAction): diff --git a/nw/gui/doctree.py b/nw/gui/doctree.py index a3f8f307..07002b2c 100644 --- a/nw/gui/doctree.py +++ b/nw/gui/doctree.py @@ -360,7 +360,7 @@ class GuiDocTree(QTreeWidget): newItem.setText(self.C_FLAGS, "") newItem.setText(self.C_HANDLE, tHandle) - newItem.setForeground(self.C_COUNT,QColor(*self.theParent.theTheme.treeWCount)) + # newItem.setForeground(self.C_COUNT,QColor(*self.theParent.theTheme.treeWCount)) newItem.setTextAlignment(self.C_COUNT,Qt.AlignRight) newItem.setFont(self.C_FLAGS,self.fontFlags) diff --git a/nw/gui/docviewer.py b/nw/gui/docviewer.py index 3ea62455..d2062b87 100644 --- a/nw/gui/docviewer.py +++ b/nw/gui/docviewer.py @@ -15,7 +15,7 @@ import nw from PyQt5.QtCore import Qt, QUrl from PyQt5.QtWidgets import QTextBrowser -from PyQt5.QtGui import QTextOption, QFont +from PyQt5.QtGui import QTextOption, QFont, QPalette, QColor from nw.convert.tokenizer import Tokenizer from nw.convert.tohtml import ToHtml @@ -37,57 +37,14 @@ class GuiDocViewer(QTextBrowser): self.theTheme = theParent.theTheme self.theHandle = None - self.theQDoc = self.document() - self.theQDoc.setDefaultStyleSheet(( - "body {{" - " font-size: {textSize}pt;" - " color: rgb({tColR},{tColG},{tColB});" - "}}\n" - "h1, h2, h3, h4 {{" - " color: rgb({hColR},{hColG},{hColB});" - "}}\n" - "a {{" - " color: rgb({aColR},{aColG},{aColB});" - "}}\n" - "pre {{" - " color: rgb({cColR},{cColG},{cColB});" - " font-size: {preSize}pt;" - "}}\n" - "mark {{" - " color: rgb({eColR},{eColG},{eColB});" - "}}\n" - "table {{" - " margin: 10px 0px;" - "}}\n" - "td {{" - " padding: 0px 4px;" - "}}\n" - ).format( - textSize = self.mainConf.textSize, - preSize = self.mainConf.textSize*0.9, - tColR = self.theTheme.colText[0], - tColG = self.theTheme.colText[1], - tColB = self.theTheme.colText[2], - hColR = self.theTheme.colHead[0], - hColG = self.theTheme.colHead[1], - hColB = self.theTheme.colHead[2], - cColR = self.theTheme.colComm[0], - cColG = self.theTheme.colComm[1], - cColB = self.theTheme.colComm[2], - eColR = self.theTheme.colEmph[0], - eColG = self.theTheme.colEmph[1], - eColB = self.theTheme.colEmph[2], - aColR = self.theTheme.colLink[0], - aColG = self.theTheme.colLink[1], - aColB = self.theTheme.colLink[2], - )) + self.qDocument = self.document() self.setMinimumWidth(300) self.initViewer() theOpt = QTextOption() if self.mainConf.doJustify: theOpt.setAlignment(Qt.AlignJustify) - self.theQDoc.setDefaultTextOption(theOpt) + self.qDocument.setDefaultTextOption(theOpt) logger.debug("DocViewer initialisation complete") @@ -102,20 +59,27 @@ class GuiDocViewer(QTextBrowser): """Set editor settings from main config. """ + self._makeStyleSheet() + # Set Font theFont = QFont() if self.mainConf.textFont is None: # If none is defined, set the default back to config - self.mainConf.textFont = self.theQDoc.defaultFont().family() + self.mainConf.textFont = self.qDocument.defaultFont().family() theFont.setFamily(self.mainConf.textFont) theFont.setPointSize(self.mainConf.textSize) self.setFont(theFont) - self.theQDoc.setDocumentMargin(self.mainConf.textMargin) + docPalette = self.palette() + docPalette.setColor(QPalette.Base, QColor(*self.theTheme.colBack)) + docPalette.setColor(QPalette.Text, QColor(*self.theTheme.colText)) + self.setPalette(docPalette) + + self.qDocument.setDocumentMargin(self.mainConf.textMargin) theOpt = QTextOption() if self.mainConf.doJustify: theOpt.setAlignment(Qt.AlignJustify) - self.theQDoc.setDefaultTextOption(theOpt) + self.qDocument.setDefaultTextOption(theOpt) # If we have a document open, we should reload it in case the font changed if self.theHandle is not None: @@ -162,4 +126,56 @@ class GuiDocViewer(QTextBrowser): return True + ## + # Internal Functions + ## + + def _makeStyleSheet(self): + + self.qDocument.setDefaultStyleSheet(( + "body {{" + " font-size: {textSize}pt;" + " color: rgb({tColR},{tColG},{tColB});" + "}}\n" + "h1, h2, h3, h4 {{" + " color: rgb({hColR},{hColG},{hColB});" + "}}\n" + "a {{" + " color: rgb({aColR},{aColG},{aColB});" + "}}\n" + "pre {{" + " color: rgb({cColR},{cColG},{cColB});" + " font-size: {preSize}pt;" + "}}\n" + "mark {{" + " color: rgb({eColR},{eColG},{eColB});" + "}}\n" + "table {{" + " margin: 10px 0px;" + "}}\n" + "td {{" + " padding: 0px 4px;" + "}}\n" + ).format( + textSize = self.mainConf.textSize, + preSize = self.mainConf.textSize*0.9, + tColR = self.theTheme.colText[0], + tColG = self.theTheme.colText[1], + tColB = self.theTheme.colText[2], + hColR = self.theTheme.colHead[0], + hColG = self.theTheme.colHead[1], + hColB = self.theTheme.colHead[2], + cColR = self.theTheme.colComm[0], + cColG = self.theTheme.colComm[1], + cColB = self.theTheme.colComm[2], + eColR = self.theTheme.colEmph[0], + eColG = self.theTheme.colEmph[1], + eColB = self.theTheme.colEmph[2], + aColR = self.theTheme.colLink[0], + aColG = self.theTheme.colLink[1], + aColB = self.theTheme.colLink[2], + )) + + return True + # END Class GuiDocViewer diff --git a/nw/gui/mainmenu.py b/nw/gui/mainmenu.py index 5c91f71c..917af5f8 100644 --- a/nw/gui/mainmenu.py +++ b/nw/gui/mainmenu.py @@ -104,8 +104,8 @@ class GuiMainMenu(QMenuBar): return True def _showAbout(self): - msgBox = QMessageBox() - msgBox.about(self.theParent, "About %s" % nw.__package__, ( + listPrefix = "  •  " + aboutMsg = ( "

About {name:s}

" "

Version: {version:s}
Release Date: {date:s}

" "

{name:s} is a markdown-like text editor designed for organising and writing novels. " @@ -121,8 +121,23 @@ class GuiMainMenu(QMenuBar): date = nw.__date__, copyright = nw.__copyright__, website = nw.__url__, - credits = "".join(["  •  %s
" % x for x in nw.__credits__]), - )) + credits = "
".join(["%s%s" % (listPrefix, x) for x in nw.__credits__]), + ) + theTheme = self.theParent.theTheme + if theTheme.themeCredit != "" or theTheme.syntaxCredit != "": + aboutMsg += "

GUI Theme and Syntax Highlighting

" + aboutMsg += "

" + if theTheme.themeCredit != "": + aboutMsg += "%s%s by %s
" % ( + listPrefix, theTheme.themeName, theTheme.themeCredit + ) + if theTheme.syntaxCredit != "": + aboutMsg += "%s%s by %s
" % ( + listPrefix, theTheme.syntaxName, theTheme.syntaxCredit + ) + aboutMsg += "

" + msgBox = QMessageBox() + msgBox.about(self.theParent, "About %s" % nw.__package__, aboutMsg) return True def _showAboutQt(self): diff --git a/nw/gui/winmain.py b/nw/gui/winmain.py index 9c4db5f7..0a8ce1aa 100644 --- a/nw/gui/winmain.py +++ b/nw/gui/winmain.py @@ -58,7 +58,6 @@ class GuiMain(QMainWindow): self.resize(*self.mainConf.winGeometry) self._setWindowTitle() self.setWindowIcon(QIcon(path.join(self.mainConf.appRoot, nwFiles.APP_ICON))) - self.theTheme.updateTheme() # Main GUI Elements self.statusBar = GuiMainStatus(self) @@ -114,9 +113,6 @@ class GuiMain(QMainWindow): self.setStatusBar(self.statusBar) self.statusBar.showMessage("Ready") - # Load Theme StyleSheet - self.setStyleSheet(self.theTheme.cssData) - # Set Up Autosaving Project Timer self.asProjTimer = QTimer() self.asProjTimer.timeout.connect(self._autoSaveProject) diff --git a/nw/theme.py b/nw/theme.py index 0460353e..ee829d8f 100644 --- a/nw/theme.py +++ b/nw/theme.py @@ -16,6 +16,9 @@ import nw from os import path, listdir +from PyQt5.QtWidgets import qApp +from PyQt5.QtGui import QPalette, QColor + from nw.enum import nwAlert logger = logging.getLogger(__name__) @@ -24,48 +27,60 @@ class Theme: def __init__(self, theParent): - self.mainConf = nw.CONFIG - self.theParent = theParent - self.guiPath = "gui" - self.syntaxPath = "syntax" - self.cssName = "styles.css" - self.confName = "theme.conf" - self.themeList = [] - self.syntaxList = [] + self.mainConf = nw.CONFIG + self.theParent = theParent + self.guiPalette = QPalette() + self.guiPath = "gui" + self.syntaxPath = "syntax" + self.cssName = "style.qss" + self.confName = "theme.conf" + self.themeList = [] + self.syntaxList = [] # Loaded Theme Settings - ## Main - self.themeName = "No Name" - - ## Syntax - self.colText = [ 0, 0, 0] - self.colLink = [ 0, 0, 0] - self.colHead = [ 0, 0, 0] - self.colHeadH = [ 0, 0, 0] - self.colEmph = [ 0, 0, 0] - self.colDialN = [ 0, 0, 0] - self.colDialD = [ 0, 0, 0] - self.colDialS = [ 0, 0, 0] - self.colComm = [ 0, 0, 0] - self.colKey = [ 0, 0, 0] - self.colVal = [ 0, 0, 0] - self.colSpell = [ 0, 0, 0] - self.colTagErr = [ 0, 0, 0] - self.colRepTag = [ 0, 0, 0] + ## Theme + self.themeName = "" + self.themeAuthor = "" + self.themeCredit = "" + self.themeUrl = "" ## GUI - self.treeWCount = [ 0, 0, 0] - self.statNone = [120,120,120] - self.statUnsaved = [120,120, 40] - self.statSaved = [ 40,120, 0] + self.treeWCount = [ 0, 0, 0] + self.statNone = [120,120,120] + self.statUnsaved = [120,120, 40] + self.statSaved = [ 40,120, 0] + + # Loaded Syntax Settings + + ## Main + self.syntaxName = "" + self.syntaxAuthor = "" + self.syntaxCredit = "" + self.syntaxUrl = "" + + ## Colours + self.colBack = [255,255,255] + self.colText = [ 0, 0, 0] + self.colLink = [ 0, 0, 0] + self.colHead = [ 0, 0, 0] + self.colHeadH = [ 0, 0, 0] + self.colEmph = [ 0, 0, 0] + self.colDialN = [ 0, 0, 0] + self.colDialD = [ 0, 0, 0] + self.colDialS = [ 0, 0, 0] + self.colComm = [ 0, 0, 0] + self.colKey = [ 0, 0, 0] + self.colVal = [ 0, 0, 0] + self.colSpell = [ 0, 0, 0] + self.colTagErr = [ 0, 0, 0] + self.colRepTag = [ 0, 0, 0] # Changeable Settings - self.guiTheme = None - self.guiSyntax = None - self.themeRoot = None - self.cssFile = None - self.cssData = "" + self.guiTheme = None + self.guiSyntax = None + self.themeRoot = None + self.cssFile = None self.updateTheme() @@ -85,8 +100,6 @@ class Theme: self.confFile = path.join(self.themePath,self.confName) self.cssFile = path.join(self.themePath,self.cssName) - print(self.guiSyntax) - self.loadTheme() self.loadSyntax() @@ -97,14 +110,57 @@ class Theme: logger.debug("Loading theme files") # CSS File + cssData = "" try: if path.isfile(self.cssFile): with open(self.cssFile,mode="r") as inFile: - self.cssData = inFile.read() + cssData = inFile.read() except Exception as e: logger.error("Could not load theme css file") return False + # Config File + confParser = configparser.ConfigParser() + try: + confParser.read_file(open(self.confFile)) + except Exception as e: + logger.error("Could not load theme settings from: %s" % self.confFile) + return False + + ## Main + cnfSec = "Main" + if confParser.has_section(cnfSec): + self.themeName = self._parseLine(confParser,cnfSec,"name", "") + self.themeAuthor = self._parseLine(confParser,cnfSec,"author","") + self.themeCredit = self._parseLine(confParser,cnfSec,"credit","") + self.themeUrl = self._parseLine(confParser,cnfSec,"url", "") + + ## Palette + cnfSec = "Palette" + if confParser.has_section(cnfSec): + self._setPalette(confParser,cnfSec,"window", QPalette.Window) + self._setPalette(confParser,cnfSec,"windowtext", QPalette.WindowText) + self._setPalette(confParser,cnfSec,"base", QPalette.Base) + self._setPalette(confParser,cnfSec,"alternatebase",QPalette.AlternateBase) + self._setPalette(confParser,cnfSec,"text", QPalette.Text) + self._setPalette(confParser,cnfSec,"tooltipbase", QPalette.ToolTipBase) + self._setPalette(confParser,cnfSec,"tooltiptext", QPalette.ToolTipText) + self._setPalette(confParser,cnfSec,"button", QPalette.Button) + self._setPalette(confParser,cnfSec,"buttontext", QPalette.ButtonText) + self._setPalette(confParser,cnfSec,"brighttext", QPalette.BrightText) + + ## GUI + cnfSec = "GUI" + if confParser.has_section(cnfSec): + self.treeWCount = self._loadColour(confParser,cnfSec,"treewordcount") + self.statNone = self._loadColour(confParser,cnfSec,"statusnone") + self.statUnsaved = self._loadColour(confParser,cnfSec,"statusunsaved") + self.statSaved = self._loadColour(confParser,cnfSec,"statussaved") + + # Apply Styles + qApp.setStyleSheet(cssData) + qApp.setPalette(self.guiPalette) + return True def loadSyntax(self): @@ -119,11 +175,15 @@ class Theme: ## Main cnfSec = "Main" if confParser.has_section(cnfSec): - self.themeName = confParser.get(cnfSec,"name") + self.syntaxName = self._parseLine(confParser,cnfSec,"name","") + self.syntaxAuthor = self._parseLine(confParser,cnfSec,"author","") + self.syntaxCredit = self._parseLine(confParser,cnfSec,"credit","") + self.syntaxUrl = self._parseLine(confParser,cnfSec,"url", "") ## Syntax cnfSec = "Syntax" if confParser.has_section(cnfSec): + self.colBack = self._loadColour(confParser,cnfSec,"background") self.colText = self._loadColour(confParser,cnfSec,"text") self.colLink = self._loadColour(confParser,cnfSec,"link") self.colHead = self._loadColour(confParser,cnfSec,"headertext") @@ -139,14 +199,6 @@ class Theme: self.colTagErr = self._loadColour(confParser,cnfSec,"tagerror") self.colRepTag = self._loadColour(confParser,cnfSec,"replacetag") - ## GUI - cnfSec = "GUI" - if confParser.has_section(cnfSec): - self.treeWCount = self._loadColour(confParser,cnfSec,"treewordcount") - self.statNone = self._loadColour(confParser,cnfSec,"statusnone") - self.statUnsaved = self._loadColour(confParser,cnfSec,"statusunsaved") - self.statSaved = self._loadColour(confParser,cnfSec,"statussaved") - logger.info("Loaded syntax colour theme '%s'" % self.guiSyntax) return True @@ -220,4 +272,25 @@ class Theme: outData = [0,0,0] return outData + def _setPalette(self, confParser, cnfSec, cnfName, paletteVal): + if confParser.has_option(cnfSec,cnfName): + inData = confParser.get(cnfSec,cnfName).split(",") + readCol = [] + try: + readCol.append(int(inData[0])) + readCol.append(int(inData[1])) + readCol.append(int(inData[2])) + except: + logger.error("Could not load theme colours for '%s' from config file" % cnfName) + return + if len(readCol) == 3: + self.guiPalette.setColor(paletteVal, QColor(*readCol)) + return + + def _parseLine(self, confParser, cnfSec, cnfName, cnfDefault): + if confParser.has_section(cnfSec): + if confParser.has_option(cnfSec, cnfName): + return confParser.get(cnfSec, cnfName) + return cnfDefault + # End Class Theme diff --git a/nw/themes/default_dark/styles.css b/nw/themes/default_dark/styles.css deleted file mode 100644 index c81aecf3..00000000 --- a/nw/themes/default_dark/styles.css +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Default Theme: Dark - */ - -* { - background-color: #999999; -} - -QTextEdit { - background-color: #141414; - color: #c7cfd0; -} - -QTextBrowser { - background-color: #141414; - color: #c7cfd0; -} - -QTreeView, QHeaderView { - font-size: 13px; -} diff --git a/nw/themes/gui/default/style.qss b/nw/themes/gui/default/style.qss new file mode 100644 index 00000000..90ef623f --- /dev/null +++ b/nw/themes/gui/default/style.qss @@ -0,0 +1,7 @@ +/** + * Default Theme: Light + */ + +QTreeView, QHeaderView { + font-size: 13px; +} diff --git a/nw/themes/gui/default/styles.css b/nw/themes/gui/default/styles.css deleted file mode 100644 index bb0961ac..00000000 --- a/nw/themes/gui/default/styles.css +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Default Theme: Light - */ - -QTextEdit { - background-color: #ffffff; - color: #141414; -} - -QTextBrowser { - background-color: #ffffff; - color: #141414; -} - -QTreeView, QHeaderView { - font-size: 13px; -} diff --git a/nw/themes/gui/default/theme.conf b/nw/themes/gui/default/theme.conf index a8248dff..004b811d 100644 --- a/nw/themes/gui/default/theme.conf +++ b/nw/themes/gui/default/theme.conf @@ -1,3 +1,2 @@ [Main] - name = Default System Theme diff --git a/nw/themes/gui/default_dark/styles.qss b/nw/themes/gui/default_dark/styles.qss new file mode 100644 index 00000000..6c847eb6 --- /dev/null +++ b/nw/themes/gui/default_dark/styles.qss @@ -0,0 +1,7 @@ +/** + * Default Theme: Dark + */ + +QTreeView, QHeaderView { + font-size: 13px; +} diff --git a/nw/themes/gui/default_dark/theme.conf b/nw/themes/gui/default_dark/theme.conf new file mode 100644 index 00000000..65bf5f1e --- /dev/null +++ b/nw/themes/gui/default_dark/theme.conf @@ -0,0 +1,23 @@ +[Main] +name = Default Dark Theme +author = Veronica Berglyd Olsen +credit = Veronica Berglyd Olsen +url = https://github.com/vkbo/novelWriter + +[Palette] +window = 54, 54, 54 +windowtext = 174, 174, 174 +base = 62, 62, 62 +alternatebase = 67, 67, 67 +text = 174, 174, 174 +tooltipbase = 255, 255, 192 +tooltiptext = 21, 21, 13 +button = 62, 62, 62 +buttontext = 174, 174, 174 +brighttext = 174, 174, 174 + +[GUI] +treewordcount = 197, 200, 198 +statusnone = 150, 152, 150 +statussaved = 39, 135, 78 +statusunsaved = 138, 32, 32 diff --git a/nw/themes/syntax/default_dark.conf b/nw/themes/syntax/default_dark.conf index 86b04b45..8d1cd6b4 100644 --- a/nw/themes/syntax/default_dark.conf +++ b/nw/themes/syntax/default_dark.conf @@ -2,6 +2,7 @@ name = Default Dark [Syntax] +background = 54, 54, 54 text = 199, 207, 208 link = 184, 200, 0 headertext = 0, 155, 200 diff --git a/nw/themes/syntax/default_light.conf b/nw/themes/syntax/default_light.conf index ded3521b..709a1ab2 100644 --- a/nw/themes/syntax/default_light.conf +++ b/nw/themes/syntax/default_light.conf @@ -2,6 +2,7 @@ name = Default Light [Syntax] +background = 255, 255, 255 text = 0, 0, 0 link = 0, 0, 200 headertext = 0, 100, 00 diff --git a/nw/themes/syntax/tomorrow.conf b/nw/themes/syntax/tomorrow.conf new file mode 100644 index 00000000..93f16598 --- /dev/null +++ b/nw/themes/syntax/tomorrow.conf @@ -0,0 +1,42 @@ +## +# Theme: Tomorrow +# Source: https://github.com/chriskempson/tomorrow-theme +# Credit: Chris Kempson +## +# Colours: +# Background = 2d2d2d : 45, 45, 45 +# Current Line = 393939 : 57, 57, 57 +# Selection = 515151 : 81, 81, 81 +# Foreground = cccccc : 204, 204, 204 +# Comment = 999999 : 153, 153, 153 +# Red = f2777a : 242, 119, 122 +# Orange = f99157 : 249, 145, 57 +# Yellow = ffcc66 : 255, 204, 102 +# Green = 99cc99 : 153, 204, 153 +# Aqua = 66cccc : 102, 204, 204 +# Blue = 6699cc : 102, 153, 204 +# Purple = cc99cc : 204, 153, 204 +## + +[Main] +name = Tomorrow +author = Veronica Berglyd Olsen +credit = Chris Kempson +url = https://github.com/chriskempson/tomorrow-theme + +[Syntax] +background = 45, 45, 45 +text = 204, 204, 204 +link = 102, 153, 204 +headertext = 102, 153, 204 +headertag = 102, 153, 204 +emphasis = 249, 145, 57 +straightquotes = 242, 119, 122 +doublequotes = 153, 204, 153 +singlequotes = 255, 204, 102 +hidden = 153, 153, 153 +keyword = 242, 119, 122 +value = 204, 153, 204 +spellcheckline = 242, 119, 122 +tagerror = 153, 204, 153 +replacetag = 102, 204, 204 diff --git a/nw/themes/syntax/base16_tomorrow_night.conf b/nw/themes/syntax/tomorrow_night.conf similarity index 82% rename from nw/themes/syntax/base16_tomorrow_night.conf rename to nw/themes/syntax/tomorrow_night.conf index b1a32176..09966ff0 100644 --- a/nw/themes/syntax/base16_tomorrow_night.conf +++ b/nw/themes/syntax/tomorrow_night.conf @@ -1,5 +1,5 @@ ## -# Theme: Base16 Tomorrow Night +# Theme: Tomorrow Night # Source: https://github.com/chriskempson/tomorrow-theme # Credit: Chris Kempson ## @@ -19,9 +19,13 @@ ## [Main] -name = Base16 Tomorrow Night +name = Tomorrow Night +author = Veronica Berglyd Olsen +credit = Chris Kempson +url = https://github.com/chriskempson/tomorrow-theme [Syntax] +background = 29, 31, 33 text = 197, 200, 198 link = 129, 162, 190 headertext = 129, 162, 190 @@ -36,9 +40,3 @@ value = 178, 148, 187 spellcheckline = 204, 102, 102 tagerror = 181, 189, 104 replacetag = 138, 190, 183 - -[GUI] -treewordcount = 197, 200, 198 -statusnone = 150, 152, 150 -statussaved = 39, 135, 78 -statusunsaved = 138, 32, 32 diff --git a/nw/themes/syntax/tomorrow_night_eighties.conf b/nw/themes/syntax/tomorrow_night_eighties.conf new file mode 100644 index 00000000..5bd0c222 --- /dev/null +++ b/nw/themes/syntax/tomorrow_night_eighties.conf @@ -0,0 +1,42 @@ +## +# Theme: Tomorrow Night Eighties +# Source: https://github.com/chriskempson/tomorrow-theme +# Credit: Chris Kempson +## +# Colours: +# Background = 2d2d2d : 45, 45, 45 +# Current Line = 393939 : 57, 57, 57 +# Selection = 515151 : 81, 81, 81 +# Foreground = cccccc : 204, 204, 204 +# Comment = 999999 : 153, 153, 153 +# Red = f2777a : 242, 119, 122 +# Orange = f99157 : 249, 145, 57 +# Yellow = ffcc66 : 255, 204, 102 +# Green = 99cc99 : 153, 204, 153 +# Aqua = 66cccc : 102, 204, 204 +# Blue = 6699cc : 102, 153, 204 +# Purple = cc99cc : 204, 153, 204 +## + +[Main] +name = Tomorrow Night Eighties +author = Veronica Berglyd Olsen +credit = Chris Kempson +url = https://github.com/chriskempson/tomorrow-theme + +[Syntax] +background = 45, 45, 45 +text = 204, 204, 204 +link = 102, 153, 204 +headertext = 102, 153, 204 +headertag = 102, 153, 204 +emphasis = 249, 145, 57 +straightquotes = 242, 119, 122 +doublequotes = 153, 204, 153 +singlequotes = 255, 204, 102 +hidden = 153, 153, 153 +keyword = 242, 119, 122 +value = 204, 153, 204 +spellcheckline = 242, 119, 122 +tagerror = 153, 204, 153 +replacetag = 102, 204, 204