script.module.codequick icon indicating copy to clipboard operation
script.module.codequick copied to clipboard

Listitem label style is ignored

Open tekbec opened this issue 1 year ago • 0 comments

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

tekbec avatar Oct 13 '23 12:10 tekbec