class StrokeColor(wal.VPanel): def __init__(self, parent, dlg, orig_color): self.dlg = dlg wal.VPanel.__init__(self, parent) cms = dlg.presenter.cms self.color_panel = SolidFill(self, dlg, cms) self.pack(self.color_panel, fill=True, expand=True) fill = [] if orig_color: fill = [0, 0, orig_color] self.color_panel.activate(fill, use_rule=False, onmodechange=self.on_mode_change) def on_mode_change(self): self.dlg.set_color(self.get_color()) def get_color(self): fill = self.color_panel.get_result() if fill: return fill[2] return []
class StrokeColor(wal.VPanel): def __init__(self, parent, dlg, orig_color): self.dlg = dlg wal.VPanel.__init__(self, parent) cms = dlg.presenter.cms self.color_panel = SolidFill(self, dlg, cms) self.pack(self.color_panel, fill=True, expand=True) fill = [] if orig_color:fill = [0, 0, orig_color] self.color_panel.activate(fill, use_rule=False, onmodechange=self.on_mode_change) def on_mode_change(self): self.dlg.set_color(self.get_color()) def get_color(self): fill = self.color_panel.get_result() if fill: return fill[2] return []