Update Ring Notepad - Use List (Hash) to define the Style Colors.
@@ -39,6 +39,18 @@ aBrowserLinks = [
colorWhite = new qColor() { setrgb(255,255,255,255) }
colorBlack = new qColor() { setrgb(0,0,0,255) }
+# Editor Style Colors
+ aStyleColors = [
+ :LineNumbersAreaColor = colorBlack ,
+ :LineNumbersAreaBackColor = colorCyan,
+ :ActiveLineBackColor = colorCyan,
+ :SyntaxColor1 = colordarkBlue,
+ :SyntaxColor2 = ColordarkMagenta,
+ :SyntaxColor3 = ColorRed,
+ :SyntaxColor4 = ColorDarkGreen,
+ :SyntaxColor5 = ColorBlue
+ ]
+
cSettingsFile = cCurrentDir + "ringnotepad.ini"
LoadSettings()
@@ -477,13 +489,19 @@ MyApp = New qApp {
setCursorPositionChangedevent("pCursorPositionChanged()")
setLineWrapMode(QTextEdit_NoWrap)
setTextChangedEvent("pTextChanged()")
- setLineNumbersAreaColor(colorBlack)
- setLineNumbersAreaBackColor(colorCyan)
+ setLineNumbersAreaColor(aStyleColors[:LineNumbersAreaColor])
+ setLineNumbersAreaBackColor(aStyleColors[:LineNumbersAreaBackColor])
}
AutoComplete()
new RingCodeHighLighter( textedit1.document() ) {
- setColors(colordarkBlue,ColordarkMagenta,ColorRed,ColorDarkGreen,ColorBlue)
+ setColors(
+ aStyleColors[:SyntaxColor1],
+ aStyleColors[:SyntaxColor2],
+ aStyleColors[:SyntaxColor3],
+ aStyleColors[:SyntaxColor4],
+ aStyleColors[:SyntaxColor5]
+ )
}
oDock2 = new qdockwidget(win1,0) {
@@ -609,7 +627,7 @@ MyApp = New qApp {
}
func pSetActiveLineColor
- textedit1.SetActiveLineColor(colorCyan)
+ textedit1.SetActiveLineColor(aStyleColors[:ActiveLineBackColor])
func pTextChanged
lAskToSave = true
