xbmcgui.ListItem does not honour label formatting
#16
(2016-05-18, 10:18)Torben Wrote: Sorry abput that. I re-read and I still dont understand how it is not forced. You can disregard my comment if you like. As i still see it you want to mix the favourite info with the title and handle that formatting script-side instead of skin-side. I would personally prefer if you choose to handle all formatting skin-side if this is a general plugin/script.

A script for a specific skin can do whatever it pleases ofcourse.

This is an example of how things should be (in my opinion), to illustrate nothing is forced:

a) Python script can do label formatting, for example:

Code:
rom_name = '[COLOR violet]Name of the ROM (Japan)[/COLOR]'

b) Kodi MUST NOT take the formatting when doing the alphabetical order, if there is any formatting.

c) Skin will get the last word. Suppose the skin does label formatting (by the way, most skins don't...), for example putting labels in red. The total label before rendering will be:

Code:
rom_name = '[COLOR red][COLOR violet]Name of the ROM (Japan)[/COLOR][/COLOR]'

It is easy to parse the formatting from inner to outer, so outer formatting (done by the skin) overrides the inner formatting (Python code), so the final formatting is what the skin does. If the skin does not touch the formatting, then the final formatting is what the Python code does.
Reply
#17
I still dont see the need for this. Why not let this particular formatting be up to the skinner as that is already how it works with everything else?
Reply
#18
(2016-05-18, 11:09)Wintermute0110 Wrote:
(2016-05-18, 10:18)Torben Wrote: Sorry abput that. I re-read and I still dont understand how it is not forced. You can disregard my comment if you like. As i still see it you want to mix the favourite info with the title and handle that formatting script-side instead of skin-side. I would personally prefer if you choose to handle all formatting skin-side if this is a general plugin/script.

A script for a specific skin can do whatever it pleases ofcourse.

This is an example of how things should be (in my opinion), to illustrate nothing is forced:

a) Python script can do label formatting, for example:

Code:
rom_name = '[COLOR violet]Name of the ROM (Japan)[/COLOR]'

b) Kodi MUST NOT take the formatting when doing the alphabetical order, if there is any formatting.

c) Skin will get the last word. Suppose the skin does label formatting (by the way, most skins don't...), for example putting labels in red. The total label before rendering will be:

Code:
rom_name = '[COLOR red][COLOR violet]Name of the ROM (Japan)[/COLOR][/COLOR]'

It is easy to parse the formatting from inner to outer, so outer formatting (done by the skin) overrides the inner formatting (Python code), so the final formatting is what the skin does. If the skin does not touch the formatting, then the final formatting is what the Python code does.

A plugin does not know whether color "violet" is defined by the skin....
As said, this is about a clear separation of tasks. Let's say the the list youre dealing with has a red background. Now the plugin sets font to red and font is not readable anymore. That should show well enough why ALL formatting should be done by skin.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#19
As a skinner I have to agree with Phil on this matter. We spend a lot of time making sure the formatting works and to have an addon mess that up is very frustrating.
Reply
#20
(2016-10-29, 21:53)Hitcher Wrote: As a skinner I have to agree with Phil on this matter. We spend a lot of time making sure the formatting works and to have an addon mess that up is very frustrating.
As a skin user I have to agree. Plugins should stop screwing around with formatting.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#21
unless they're adding a [COLOR=pink] tag of course, then all is fine :-)
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#22
As a plugin developer, I have to disagree with @Hitcher and @Martijn. Advanced Emulator Launcher/Advanced MAME Launcher have become rather complex pieces of software that need to display quite some information to users about their ROMs. After a lot of time spent trying things, I found the ability to add tags with colours to the ListItem items is a very satisfactory solution (although not optimal), and so think AEL users. If you know a better, more elegant way of doing it I'm all ears.

Also, I have to use this trick because the chronic lack of additional views and metadata fields for Program addons, which greatly limits the information program addons can present to the user. A little off-topic, but eventually Retroplayer will be merged into Kodi and AEL/AML are very good guinea pigs of what would be needed for the new "games" media type.

Finally, current implementation in Kodi about this matter is fine, so please keep it this way. I'm not using [COLOR=pink] and promise I won't Big Grin Let users have the freedom about which addons/skins they want to use.
Reply

Logout Mark Read Team Forum Stats Members Help
xbmcgui.ListItem does not honour label formatting0