Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

noFocusColor does not match Program description text colour #113

Open
jonjo40 opened this issue Feb 21, 2018 · 7 comments
Open

noFocusColor does not match Program description text colour #113

jonjo40 opened this issue Feb 21, 2018 · 7 comments

Comments

@jonjo40
Copy link

jonjo40 commented Feb 21, 2018

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..

@primaeval
Copy link
Owner

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

@jonjo40
Copy link
Author

jonjo40 commented Feb 21, 2018

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)

@primaeval
Copy link
Owner

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.

@jonjo40
Copy link
Author

jonjo40 commented Feb 21, 2018

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

@primaeval
Copy link
Owner

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.

@jonjo40
Copy link
Author

jonjo40 commented Feb 21, 2018

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. :)

@primaeval
Copy link
Owner

Here is a bit of info about Skin Tightener.
https://forum.kodi.tv/showthread.php?tid=311660

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants