2019-08-24, 15:30
(2019-08-24, 07:37)jurialmunkey Wrote: I'm giving it a spin now. Do you want bug reports on github or here?
One bug I noticed immediately: In the customisation dialog in itemlayout of list id="211" ListItem.Icon is no longer showing the menu item icons.
Let me know what details you need.
Bug reports anywhere you want are fine with me
I found the problem but not yet sure how to fix it.
In gui.py line 371.
Using Leia and reverting back to this:
Code:
listitem.setIconImage( overridenIcon.text )
Code:
listitem.setArt({'icon': 'overridenIcon.text'})
python:
# If there's an overriden icon, use it
overridenIcon = item.find( "override-icon" )
if overridenIcon is not None:
listitem.setArt({'icon': 'overridenIcon.text'})
listitem.setProperty( "icon", overridenIcon.text )
listitem.setProperty( "original-icon", icon )
The overridenIcon appears to come from the override-icon here:
python:
# Get a skin-overriden icon
overridenIcon = self._get_icon_overrides( skinoverrides, node.find( "icon" ).text, group, labelID )
if overridenIcon is not None:
# Add a new node with the overriden icon
xmltree.SubElement( node, "override-icon" ).text = overridenIcon
I am not sure if def _save_shortcuts_function is related but on line 684 of gui.py it does try_decode:
Code:
xmltree.SubElement( shortcut, "icon" ).text = try_decode( icon )
python:
def try_decode(text, encoding="utf-8"):
if isinstance(text, str):
try:
return text.decode(encoding)
except:
pass
return text
I am just guessing here but maybe it is str or encode/decode related due to the .text part?
I am trying to figure out how to pass overridenIcon.text using setArt but I am still in the very early learning stage so perhaps you or someone else has any ideas how to fix it?
Thanks.