Lib/idlelib/configdialog.py
def paint_theme_sample(self):
        "Apply the theme colors to each element tag in the sample text."
        if self.is_builtin_theme.get():  # Default theme
            theme = self.builtin_theme.get()
        else:  # User theme
            theme = self.custom_theme.get()
        for element_title in self.theme_elements:
            element = self.theme_elements[element_title][0]
            colours = idleConf.GetHighlight(theme, element)
            if element == 'cursor':  # Cursor sample needs special painting.
                colours['background'] = idleConf.GetHighlight(
                        theme, 'normal', fgBg='bg')
            # Handle any unsaved changes to this theme.
            if theme in changes['highlight']:
                theme_dict = changes['highlight'][theme]
                if element + '-foreground' in theme_dict:
                    colours['foreground'] = theme_dict[element + '-foreground']
                if element + '-background' in theme_dict:
                    colours['background'] = theme_dict[element + '-background']
            self.text_highlight_sample.tag_config(element, **colours)
        self.set_colour_sample()
Apply the theme colors to each element tag in the sample text.
Apply the theme colors to each element tag in the sample text.
Apply the theme colors to each element tag in the sample text .
def paint_theme_sample(self):
        if self.is_builtin_theme.get():  
            theme = self.builtin_theme.get()
        else:  
            theme = self.custom_theme.get()
        for element_title in self.theme_elements:
            element = self.theme_elements[element_title][0]
            colours = idleConf.GetHighlight(theme, element)
            if element == 'cursor':  
                colours['background'] = idleConf.GetHighlight(
                        theme, 'normal', fgBg='bg')
            if theme in changes['highlight']:
                theme_dict = changes['highlight'][theme]
                if element + '-foreground' in theme_dict:
                    colours['foreground'] = theme_dict[element + '-foreground']
                if element + '-background' in theme_dict:
                    colours['background'] = theme_dict[element + '-background']
            self.text_highlight_sample.tag_config(element, **colours)
        self.set_colour_sample()
def paint_theme_sample ( self ) : if self . is_builtin_theme . get ( ) : theme = self . builtin_theme . get ( ) else : theme = self . custom_theme . get ( ) for element_title in self . theme_elements : element = self . theme_elements [ element_title ] [ 0 ] colours = idleConf . GetHighlight ( theme , element ) if element == 'cursor' : colours [ 'background' ] = idleConf . GetHighlight ( theme , 'normal' , fgBg = 'bg' ) if theme in changes [ 'highlight' ] : theme_dict = changes [ 'highlight' ] [ theme ] if element + '-foreground' in theme_dict : colours [ 'foreground' ] = theme_dict [ element + '-foreground' ] if element + '-background' in theme_dict : colours [ 'background' ] = theme_dict [ element + '-background' ] self . text_highlight_sample . tag_config ( element , ** colours ) self . set_colour_sample ( )
Apply the theme colors to each element tag in the sample text.
Apply the theme colors to each element tag in the sample text .
"Apply the theme colors to each element tag in the sample text." # Default theme # User theme # Cursor sample needs special painting. # Handle any unsaved changes to this theme.
self