def updatedStyle(self, style, text): fmt = StyleFormat(self.cur_theme["data"][style]) fmt.update(text) self.cur_theme["data"][style] = str(fmt) self.styleChanged.emit({style: text})
def setStyle(self, text): """ updates every children to match the StyleFormat(text) fields""" style = StyleFormat(text) for key, setter in self.setters.items(): setter(style[key])