Set the color of the frame background to reflect the selected target. Instance variables accessed: theme_elements highlight_target fg_bg_toggle highlight_sample Attributes updated: frame_color_set
(self)
| 988 | self.set_color_sample() |
| 989 | |
| 990 | def set_color_sample(self): |
| 991 | """Set the color of the frame background to reflect the selected target. |
| 992 | |
| 993 | Instance variables accessed: |
| 994 | theme_elements |
| 995 | highlight_target |
| 996 | fg_bg_toggle |
| 997 | highlight_sample |
| 998 | |
| 999 | Attributes updated: |
| 1000 | frame_color_set |
| 1001 | """ |
| 1002 | # Set the color sample area. |
| 1003 | tag = self.theme_elements[self.highlight_target.get()] |
| 1004 | plane = 'foreground' if self.fg_bg_toggle.get() else 'background' |
| 1005 | color = self.highlight_sample.tag_cget(tag, plane) |
| 1006 | self.style.configure('frame_color_set.TFrame', background=color) |
| 1007 | |
| 1008 | def paint_theme_sample(self): |
| 1009 | """Apply the theme colors to each element tag in the sample text. |