py_ext/PythonEditor.py
changeset 1058 bb8ac451c28a
parent 1057 3837e165b3f9
child 1060 ac9896336b90
equal deleted inserted replaced
1057:3837e165b3f9 1058:bb8ac451c28a
   164 
   164 
   165         # Following style specs only indicate differences from default.
   165         # Following style specs only indicate differences from default.
   166         # The rest remains unchanged.
   166         # The rest remains unchanged.
   167 
   167 
   168         # Line numbers in margin
   168         # Line numbers in margin
   169         self.PythonCodeEditor.StyleSetSpec(stc.STC_STYLE_LINENUMBER,'fore:#000000,back:#99A9C2')    
   169         self.PythonCodeEditor.StyleSetSpec(stc.STC_STYLE_LINENUMBER,'fore:#000000,back:#99A9C2,size:%(size)d' % faces)    
   170         # Highlighted brace
   170         # Highlighted brace
   171         self.PythonCodeEditor.StyleSetSpec(stc.STC_STYLE_BRACELIGHT,'fore:#00009D,back:#FFFF00')
   171         self.PythonCodeEditor.StyleSetSpec(stc.STC_STYLE_BRACELIGHT,'fore:#00009D,back:#FFFF00,size:%(size)d' % faces)
   172         # Unmatched brace
   172         # Unmatched brace
   173         self.PythonCodeEditor.StyleSetSpec(stc.STC_STYLE_BRACEBAD,'fore:#00009D,back:#FF0000')
   173         self.PythonCodeEditor.StyleSetSpec(stc.STC_STYLE_BRACEBAD,'fore:#00009D,back:#FF0000,size:%(size)d' % faces)
   174         # Indentation guide
   174         # Indentation guide
   175         self.PythonCodeEditor.StyleSetSpec(stc.STC_STYLE_INDENTGUIDE, "fore:#CDCDCD")
   175         self.PythonCodeEditor.StyleSetSpec(stc.STC_STYLE_INDENTGUIDE, 'fore:#CDCDCD,size:%(size)d' % faces)
   176 
   176 
   177         # Python styles
   177         # Python styles
   178         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_DEFAULT, 'fore:#000000')
   178         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_DEFAULT, 'fore:#000000,size:%(size)d' % faces)
   179         # Comments
   179         # Comments
   180         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_COMMENTLINE,  'fore:#008000,back:#F0FFF0')
   180         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_COMMENTLINE,  'fore:#008000,back:#F0FFF0,size:%(size)d' % faces)
   181         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_COMMENTBLOCK, 'fore:#008000,back:#F0FFF0')
   181         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_COMMENTBLOCK, 'fore:#008000,back:#F0FFF0,size:%(size)d' % faces)
   182         # Numbers
   182         # Numbers
   183         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_NUMBER, 'fore:#008080')
   183         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_NUMBER, 'fore:#008080,size:%(size)d' % faces)
   184         # Strings and characters
   184         # Strings and characters
   185         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_STRING, 'fore:#800080')
   185         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_STRING, 'fore:#800080,size:%(size)d' % faces)
   186         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_CHARACTER, 'fore:#800080')
   186         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_CHARACTER, 'fore:#800080,size:%(size)d' % faces)
   187         # Keywords
   187         # Keywords
   188         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_WORD, 'fore:#000080,bold')
   188         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_WORD, 'fore:#000080,bold,size:%(size)d' % faces)
   189         # Triple quotes
   189         # Triple quotes
   190         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_TRIPLE, 'fore:#800080,back:#FFFFEA')
   190         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_TRIPLE, 'fore:#800080,back:#FFFFEA,size:%(size)d' % faces)
   191         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_TRIPLEDOUBLE, 'fore:#800080,back:#FFFFEA')
   191         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_TRIPLEDOUBLE, 'fore:#800080,back:#FFFFEA,size:%(size)d' % faces)
   192         # Class names
   192         # Class names
   193         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_CLASSNAME, 'fore:#0000FF,bold')
   193         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_CLASSNAME, 'fore:#0000FF,bold,size:%(size)d' % faces)
   194         # Function names
   194         # Function names
   195         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_DEFNAME, 'fore:#008080,bold')
   195         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_DEFNAME, 'fore:#008080,bold,size:%(size)d' % faces)
   196         # Operators
   196         # Operators
   197         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_OPERATOR, 'fore:#800000,bold')
   197         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_OPERATOR, 'fore:#800000,bold,size:%(size)d' % faces)
   198         # Identifiers. I leave this as not bold because everything seems
   198         # Identifiers. I leave this as not bold because everything seems
   199         # to be an identifier if it doesn't match the above criterae
   199         # to be an identifier if it doesn't match the above criterae
   200         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_IDENTIFIER, 'fore:#000000')
   200         self.PythonCodeEditor.StyleSetSpec(stc.STC_P_IDENTIFIER, 'fore:#000000,size:%(size)d' % faces)
   201         
   201         
   202         # Highlighting styles
   202         # Highlighting styles
   203         self.PythonCodeEditor.StyleSetSpec(STC_PYTHON_ERROR, "fore:#FF0000,back:#FFFF00")
   203         self.PythonCodeEditor.StyleSetSpec(STC_PYTHON_ERROR, 'fore:#FF0000,back:#FFFF00,size:%(size)d' % faces)
   204         self.PythonCodeEditor.StyleSetSpec(STC_PYTHON_SEARCH_RESULT, "fore:#FFFFFF,back:#FFA500")
   204         self.PythonCodeEditor.StyleSetSpec(STC_PYTHON_SEARCH_RESULT, 'fore:#FFFFFF,back:#FFA500,size:%(size)d' % faces)
   205         
   205         
   206         # Caret color
   206         # Caret color
   207         self.PythonCodeEditor.SetCaretForeground("BLUE")
   207         self.PythonCodeEditor.SetCaretForeground("BLUE")
   208         # Selection background
   208         # Selection background
   209         self.PythonCodeEditor.SetSelBackground(1, '#66CCFF')
   209         self.PythonCodeEditor.SetSelBackground(1, '#66CCFF')