Open jonjo40 opened 6 years ago
I'm pretty sure it can't be done from the code in gui.py. It needs to be done in the xml. You can't set a control's colour in the code. http://mirrors.kodi.tv/docs/python-docs/16.x-jarvis/xbmcgui.html
The program buttons are created dynamically because they change on every scroll. When you create controls you can specify all of their parameters in the constructor including colour.
Change the textcolor of control id=7022 in script-tvguide-main.xml
This is where to put your new skin. https://github.com/primaeval/script.tvguide.fullscreen/wiki/Settings#skin-type-skinsource
Damn. Okay, what about in script-tvguide-main.xml - Is there a way to pull in from settings.xml? Like:
control id=7022.....
<textcolor>(ADDON.getSetting('epg.nofocus.color'))</textcolor> or
<textcolor>Addon.OpenSettings(plugin.video.name)(ADDON.getSetting('epg.nofocus.color'))</textcolor>
or something like that at all? lol. (Im useless but, I try haha)
Nope.
There is the concept of parameters for the xml files but that only works for the actual Kodi Skins not TVGF skins.
How often do you need to change your plot colour? There aren't many changes going on these days with TVGF so you'll probably only going to need to do it once.
Its not so much the plot text colour by itself - Its more changing the entire colour of GUI, only to find out that you can change the focus and noFocus colours but, can't change the plot text without going physically into the XML to change it. :( Id rather either set the plot colour in the settings.xml for the text or just use the epg.nofocus.color colour already in there.
Not to worry, thanks a lot for your help. I'll think of a workaround. Cheers
When I added the colour settings I was hoping I could change everything in the code. It was disappointing when I found the Kodi limitations.
If you want to get clever you could make an addon that copies a skin to the user skin folder and modifies all of the textcolor parameters to the noFocus color. You could have a look at how the extra TVGF skin addons work and maybe my Skin Tightener addon for making changes to the xml. It does a deep copy of a skin to a new folder. You can pick up the noFocus color from the TVGF settings.
If you want to make it robust use an xml parser like in TVGF source.py.
I am intending on looking into the "Skins as Addons" like you have here. A nice tidy way to keep things rather than just adding an endless amounts of 720 and media folders. That could grow rather quickly hehe. Thanks again for your help :) ohhh - and the skin tightner addon? I'll have to investigate, thats a new one for me. :)
Here is a bit of info about Skin Tightener. https://forum.kodi.tv/showthread.php?tid=311660
Hey there, wonder if you could help. as the title says, You can change the colours of the program titles (focus and noFocus) but, not the program description (synopsis) This hinders coloured backgrounds use.
Is there anyway I could get the program description to use the (ADDON.getSetting('epg.nofocus.color')) colour? Thanks a lot. Appreciate your work. :)
Jj..