Return dict of theme element highlight colors. The keys are 'foreground' and 'background'. The values are tkinter color strings for configuring backgrounds and tags.
(self, theme, element)
| 273 | return cfgParser.sections() |
| 274 | |
| 275 | def GetHighlight(self, theme, element): |
| 276 | """Return dict of theme element highlight colors. |
| 277 | |
| 278 | The keys are 'foreground' and 'background'. The values are |
| 279 | tkinter color strings for configuring backgrounds and tags. |
| 280 | """ |
| 281 | cfg = ('default' if self.defaultCfg['highlight'].has_section(theme) |
| 282 | else 'user') |
| 283 | theme_dict = self.GetThemeDict(cfg, theme) |
| 284 | fore = theme_dict[element + '-foreground'] |
| 285 | if element == 'cursor': |
| 286 | element = 'normal' |
| 287 | back = theme_dict[element + '-background'] |
| 288 | return {"foreground": fore, "background": back} |
| 289 | |
| 290 | def GetThemeDict(self, type, themeName): |
| 291 | """Return {option:value} dict for elements in themeName. |