Move highlighting theme setting back to General tab in Preferences
This commit is contained in:
@@ -203,6 +203,22 @@ class GuiPreferencesGeneral(QWidget):
|
|||||||
self.tr("Requires restart.")
|
self.tr("Requires restart.")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Editor Theme
|
||||||
|
self.guiSyntax = QComboBox()
|
||||||
|
self.guiSyntax.setMinimumWidth(self.mainConf.pxInt(200))
|
||||||
|
self.theSyntaxes = self.theTheme.listSyntax()
|
||||||
|
for syntaxFile, syntaxName in self.theSyntaxes:
|
||||||
|
self.guiSyntax.addItem(syntaxName, syntaxFile)
|
||||||
|
syntaxIdx = self.guiSyntax.findData(self.mainConf.guiSyntax)
|
||||||
|
if syntaxIdx != -1:
|
||||||
|
self.guiSyntax.setCurrentIndex(syntaxIdx)
|
||||||
|
|
||||||
|
self.mainForm.addRow(
|
||||||
|
self.tr("Editor theme"),
|
||||||
|
self.guiSyntax,
|
||||||
|
self.tr("Colour theme for the editor and viewer.")
|
||||||
|
)
|
||||||
|
|
||||||
# Font Family
|
# Font Family
|
||||||
self.guiFont = QLineEdit()
|
self.guiFont = QLineEdit()
|
||||||
self.guiFont.setReadOnly(True)
|
self.guiFont.setReadOnly(True)
|
||||||
@@ -275,6 +291,7 @@ class GuiPreferencesGeneral(QWidget):
|
|||||||
guiLang = self.guiLang.currentData()
|
guiLang = self.guiLang.currentData()
|
||||||
guiTheme = self.guiTheme.currentData()
|
guiTheme = self.guiTheme.currentData()
|
||||||
guiIcons = self.guiIcons.currentData()
|
guiIcons = self.guiIcons.currentData()
|
||||||
|
guiSyntax = self.guiSyntax.currentData()
|
||||||
guiFont = self.guiFont.text()
|
guiFont = self.guiFont.text()
|
||||||
guiFontSize = self.guiFontSize.value()
|
guiFontSize = self.guiFontSize.value()
|
||||||
emphLabels = self.emphLabels.isChecked()
|
emphLabels = self.emphLabels.isChecked()
|
||||||
@@ -294,6 +311,7 @@ class GuiPreferencesGeneral(QWidget):
|
|||||||
self.mainConf.guiLang = guiLang
|
self.mainConf.guiLang = guiLang
|
||||||
self.mainConf.guiTheme = guiTheme
|
self.mainConf.guiTheme = guiTheme
|
||||||
self.mainConf.guiIcons = guiIcons
|
self.mainConf.guiIcons = guiIcons
|
||||||
|
self.mainConf.guiSyntax = guiSyntax
|
||||||
self.mainConf.guiFont = guiFont
|
self.mainConf.guiFont = guiFont
|
||||||
self.mainConf.guiFontSize = guiFontSize
|
self.mainConf.guiFontSize = guiFontSize
|
||||||
self.mainConf.emphLabels = emphLabels
|
self.mainConf.emphLabels = emphLabels
|
||||||
@@ -834,25 +852,6 @@ class GuiPreferencesSyntax(QWidget):
|
|||||||
self.mainForm.setHelpTextStyle(self.theTheme.helpText)
|
self.mainForm.setHelpTextStyle(self.theTheme.helpText)
|
||||||
self.setLayout(self.mainForm)
|
self.setLayout(self.mainForm)
|
||||||
|
|
||||||
# Highlighting Theme
|
|
||||||
# ==================
|
|
||||||
self.mainForm.addGroupLabel(self.tr("Highlighting Theme"))
|
|
||||||
|
|
||||||
self.guiSyntax = QComboBox()
|
|
||||||
self.guiSyntax.setMinimumWidth(self.mainConf.pxInt(200))
|
|
||||||
self.theSyntaxes = self.theTheme.listSyntax()
|
|
||||||
for syntaxFile, syntaxName in self.theSyntaxes:
|
|
||||||
self.guiSyntax.addItem(syntaxName, syntaxFile)
|
|
||||||
syntaxIdx = self.guiSyntax.findData(self.mainConf.guiSyntax)
|
|
||||||
if syntaxIdx != -1:
|
|
||||||
self.guiSyntax.setCurrentIndex(syntaxIdx)
|
|
||||||
|
|
||||||
self.mainForm.addRow(
|
|
||||||
self.tr("Highlighting theme"),
|
|
||||||
self.guiSyntax,
|
|
||||||
self.tr("Colour theme for the editor and viewer.")
|
|
||||||
)
|
|
||||||
|
|
||||||
# Quotes & Dialogue
|
# Quotes & Dialogue
|
||||||
# =================
|
# =================
|
||||||
self.mainForm.addGroupLabel(self.tr("Quotes & Dialogue"))
|
self.mainForm.addGroupLabel(self.tr("Quotes & Dialogue"))
|
||||||
@@ -912,9 +911,6 @@ class GuiPreferencesSyntax(QWidget):
|
|||||||
def saveValues(self):
|
def saveValues(self):
|
||||||
"""Save the values set for this tab.
|
"""Save the values set for this tab.
|
||||||
"""
|
"""
|
||||||
# Highlighting Theme
|
|
||||||
self.mainConf.guiSyntax = self.guiSyntax.currentData()
|
|
||||||
|
|
||||||
# Quotes & Dialogue
|
# Quotes & Dialogue
|
||||||
self.mainConf.highlightQuotes = self.highlightQuotes.isChecked()
|
self.mainConf.highlightQuotes = self.highlightQuotes.isChecked()
|
||||||
self.mainConf.allowOpenSQuote = self.allowOpenSQuote.isChecked()
|
self.mainConf.allowOpenSQuote = self.allowOpenSQuote.isChecked()
|
||||||
|
|||||||
Reference in New Issue
Block a user