• Home
  • Raw
  • Download

Lines Matching full:theme

74         # Each theme element key is its display name.
704 concerned. Any theme can be used as the base for a new custom
705 theme, stored in .idlerc/config-highlight.cfg.
707 Function load_theme_cfg() initializes tk variables and theme
709 for the current theme. Radiobuttons builtin_theme_on and
711 current set of colors are from a builtin or custom theme.
716 Function paint_theme_sample() applies the colors from the theme
729 paint_theme_sample() (theme is changed or load_cfg is called), and
733 a custom theme from idleConf.userCfg['highlight'] and changes.
735 get_new_theme_name() and create_new() to save a custom theme
749 the color attributes of the current theme and changes for those tags.
760 shown in set_color_sample() for the current theme. Button set_color
768 builtin_name: Menu variable for built-in theme.
769 custom_name: Menu variable for custom theme.
772 theme_source: Selector for built-in or custom theme.
789 create_new: Combine theme with changes and save.
793 save_new: Save to userCfg['theme'] (is function).
849 text=' Highlighting Theme ')
910 frame_custom, text='Save as New Custom Theme',
916 command=self.set_theme_type, text='a Built-in Theme')
919 command=self.set_theme_type, text='a Custom Theme')
925 frame_theme, text='Delete Custom Theme',
952 """Load current configuration settings for the theme options.
954 Based on the theme_source toggle, the theme is set as
971 # Set current theme type radiobutton.
973 'main', 'Theme', 'default', type='bool', default=1))
974 # Set current theme.
976 # Load available theme option menus.
977 if self.theme_source.get(): # Default theme selected.
988 else: # User theme selected.
996 # Load theme element option menu.
1004 """Process new builtin theme selection.
1006 Add the changed theme's name to the changed_items and recreate
1007 the sample with the values from the selected theme.
1012 if idleConf.GetOption('main', 'Theme', 'name') not in old_themes:
1013 changes.add_option('main', 'Theme', 'name', old_themes[0])
1014 changes.add_option('main', 'Theme', 'name2', value)
1015 self.theme_message['text'] = 'New theme, see Help'
1017 changes.add_option('main', 'Theme', 'name', value)
1018 changes.add_option('main', 'Theme', 'name2', '')
1023 """Process new custom theme selection.
1025 If a new custom theme is selected, add the name to the
1026 changed_items and apply the theme to the sample.
1030 changes.add_option('main', 'Theme', 'name', value)
1034 """Process toggle between builtin and custom theme.
1037 selected theme type.
1040 changes.add_option('main', 'Theme', 'default', value)
1055 """Set available screen options based on builtin or custom theme.
1085 If a new color is selected while using a builtin theme, a
1086 name must be supplied to create a custom theme.
1108 if self.theme_source.get(): # Current theme is a built-in.
1109 message = ('Your changes will be saved as a new Custom Theme. '
1110 'Enter a name for your new Custom Theme below.')
1112 if not new_theme: # User cancelled custom theme creation.
1114 else: # Create new custom theme based on previously active theme.
1117 else: # Current theme is user defined.
1127 theme = self.custom_name.get()
1129 changes.add_option('highlight', theme, theme_element, new_color)
1132 "Return name of new theme from query popup."
1136 self, 'New Custom Theme', message, used_names).result
1140 """Prompt for new theme name and create the theme.
1146 new_theme_name = self.get_new_theme_name('New Theme Name:')
1151 """Create a new custom theme with the given name.
1153 Create the new theme based on the previously active theme
1155 activate the new theme.
1176 # Apply any of the old theme's unsaved changes to the new theme.
1181 # Save the new theme.
1183 # Change GUI over to the new theme.
1245 """Apply the theme colors to each element tag in the sample text.
1254 highlight_sample: Set the tag elements to the theme.
1264 if self.theme_source.get(): # Default theme
1265 theme = self.builtin_name.get()
1266 else: # User theme
1267 theme = self.custom_name.get()
1270 colors = idleConf.GetHighlight(theme, element)
1273 theme, 'normal')['background']
1274 # Handle any unsaved changes to this theme.
1275 if theme in changes['highlight']:
1276 theme_dict = changes['highlight'][theme]
1284 def save_new(self, theme_name, theme): argument
1285 """Save a newly created theme to idleConf.
1287 theme_name - string, the name of the new theme
1288 theme - dictionary containing the new theme
1291 for element in theme:
1292 value = theme[element]
1300 """Handle event to delete custom theme.
1302 The current theme is deactivated and the default theme is
1303 activated. The custom theme is permanently removed from
1322 delmsg = 'Are you sure you wish to delete the theme %r ?'
1324 'Delete Theme', delmsg % theme_name, parent=self):
1327 # Remove theme from changes, config, and file.
1329 # Reload user theme list.
1337 # Revert to default theme.
1338 self.theme_source.set(idleConf.defaultCfg['main'].Get('Theme', 'default'))
1339 self.builtin_name.set(idleConf.defaultCfg['main'].Get('Theme', 'name'))
1523 if self.keyset_source.get(): # Default theme selected.
2289 The IDLE Dark color theme is new in October 2015. It can only
2291 theme, with a different name.