def configure_canvas(self, **kwargs): canvas_name = kwargs.pop("canvas_name", None) if canvas_name is not None: ConfigManager.set("canvas_name", canvas_name) options = remove_default_options(kwargs, self.canvas.configure()) self.canvas.configure(**options) self.codetext.configure_canvas(canvas_name=canvas_name, **options)
def set_theme(self, name): canvas_color = self.canvas.configure("bg") self.theme_manager.set_theme(name) self.codetext.update_theme() self.canvas.configure(bg=canvas_color[-1]) self.update() ConfigManager.set("theme", name)