- update in Code Highlighter to highlight the X and Y chars

- updated the Document and Script objects Beginner/Advanced selection labels to the same as the rest of the app objects
This commit is contained in:
Marius Stanciu
2021-02-27 04:48:00 +02:00
committed by Marius
parent 1dbdb917fb
commit ca748d9a02
4 changed files with 100 additions and 8 deletions

View File

@@ -4347,6 +4347,8 @@ class FCTextAreaLineNumber(QtWidgets.QFrame):
number = QtGui.QTextCharFormat()
string = QtGui.QTextCharFormat()
singleQuotedString = QtGui.QTextCharFormat()
x_chars = QtGui.QTextCharFormat()
y_chars = QtGui.QTextCharFormat()
comment = QtGui.QTextCharFormat()
# comment
@@ -4483,6 +4485,24 @@ class FCTextAreaLineNumber(QtWidgets.QFrame):
singleQuotedString.setForeground(brush)
rule = (pattern, singleQuotedString)
self.highlightingRules.append(rule)
# X coordinate
brush = QtGui.QBrush(Qt.darkBlue, Qt.SolidPattern)
pattern = QtCore.QRegExp("X")
pattern.setMinimal(True)
x_chars.setFontWeight(QtGui.QFont.Bold)
x_chars.setForeground(brush)
rule = (pattern, x_chars)
self.highlightingRules.append(rule)
# Y coordinate
brush = QtGui.QBrush(Qt.darkBlue, Qt.SolidPattern)
pattern = QtCore.QRegExp("Y")
pattern.setMinimal(True)
y_chars.setFontWeight(QtGui.QFont.Bold)
y_chars.setForeground(brush)
rule = (pattern, y_chars)
self.highlightingRules.append(rule)
else:
self.highlightingRules = highlight_rules