コード例 #1
0
 def ResetColorizer(self):
     "Update the color theme"
     # Called from self.filename_change_hook and from configDialog.py
     self._rmcolorizer()
     self._addcolorizer()
     theme = MrPythonConf.GetOption('main','Theme','name')
     normal_colors = MrPythonConf.GetHighlight(theme, 'normal')
     cursor_color = MrPythonConf.GetHighlight(theme, 'cursor', fgBg='fg')
     select_colors = MrPythonConf.GetHighlight(theme, 'hilite')
     self.config(
         foreground=normal_colors['foreground'],
         background=normal_colors['background'],
         insertbackground=cursor_color,
         selectforeground=select_colors['foreground'],
         selectbackground=select_colors['background'],
         )
コード例 #2
0
    def LoadTagDefs(self):
        theme = MrPythonConf.GetOption('main','Theme','name')
        self.tagdefs = {
            "COMMENT": MrPythonConf.GetHighlight(theme, "comment"),
            "KEYWORD": MrPythonConf.GetHighlight(theme, "keyword"),
            "BUILTIN": MrPythonConf.GetHighlight(theme, "builtin"),
            "STRING": MrPythonConf.GetHighlight(theme, "string"),
            "DEFINITION": MrPythonConf.GetHighlight(theme, "definition"),
            "SYNC": {'background':None,'foreground':None},
            "TODO": {'background':None,'foreground':None},
            "ERROR": MrPythonConf.GetHighlight(theme, "error"),
            # The following is used by ReplaceDialog:
            "hit": MrPythonConf.GetHighlight(theme, "hit"),
            }

        if DEBUG: print('tagdefs',self.tagdefs)