script.module.codequick
script.module.codequick copied to clipboard
Listitem label style is ignored
Text styling on Listitem label is ignored. The issues is here:
@label.setter
def label(self, label): # type: (str) -> None
self.listitem.setLabel(label)
unformatted_label = strip_formatting("", label)
self.params["_title_"] = unformatted_label
self.info["title"] = unformatted_label
Before setting the listitem title, the styling is removed by the strip_formatting() function. I don't know if this is the expected behavior, but the only way I found to keep the styling is the workaround below:
listitem = Listitem.from_dict(game_links, label, params={'game_id': game['id']})
listitem.info.title = label