SageTV Community

SageTV Community (http://forums.sagetv.com/forums/index.php)
-   SageTV Studio (http://forums.sagetv.com/forums/forumdisplay.php?f=34)
-   -   Question on Text properties and color (http://forums.sagetv.com/forums/showthread.php?t=63676)

CollegeProject 11-04-2016 10:16 AM

Question on Text properties and color
 
I am storing colors in properties files so they get stored like

Code:

Property=\#cc9933
for the color "#cc9933". It all returns fine in a string but for some reason when I set the color on a theme for the Font specifically it doesn't get set
say I have

Code:

ForegroundColor=GetProperty(property,"#cc9933")
The color doesn't get set. I have a feeling it's how the theme widget is parsing it vs a text widget. Whats odd is it also works ok in retrieving image names named after the color.

What am I missing?

CollegeProject 11-04-2016 10:28 AM

I believe it is the "\" adder the setproperty call is adding to it because looking in the default themes they don't have a "\" after the color...So anyone know how to remove the "\" from getting set in the property? it appears text widgets parse it correctly but the theme setting doesn't

JREkiwi 11-07-2016 01:33 PM

Try
Code:

property=0xcc9933
ForegroundColor=GetProperty(property,"0xcc9933")

I'm assuming the different case of property/Property in your example is a typo :)

John

CollegeProject 11-07-2016 02:06 PM

Quote:

Originally Posted by JREkiwi (Post 595163)
Try
Code:

property=0xcc9933
ForegroundColor=GetProperty(property,"0xcc9933")

I'm assuming the different case of property/Property in your example is a typo :)

John

Ya I type on the post. I gave up on this after testing fully by putting calls in the color property of a theme widget that logged I can see these are only set on occasion. It appears to be at first draw and then they aren't rechecked for instance when an area is refreshed. So it kind of threw my dynamic coloring of fonts out the window. But it's ok at least I somewhat figure out why. It appears the theme widgets are more "permanent" setting than other widgets that refresh their attributes when the area is refreshed.

JREkiwi 11-07-2016 08:33 PM

They way I've seen it done and done myself in the past is to check to see if the value has changed and if so reload the menu.

John

CollegeProject 11-07-2016 09:29 PM

Quote:

Originally Posted by JREkiwi (Post 595181)
They way I've seen it done and done myself in the past is to check to see if the value has changed and if so reload the menu.

John

That might work but sounds slow. I was changing the value often based on a selection. It's ok I went a different route thanks for trying to help! That makes sense that would trigger the refresh of the value.

Opus4 11-08-2016 12:57 PM

Quote:

Originally Posted by CollegeProject (Post 595059)
Code:

ForegroundColor=GetProperty(property,"#cc9933")

I'm curious: are you setting the theme value via the GetProperty call or by using =SomeVariableName?

Setting it dynamically using a variable name, instead of using the API call, ought to work, as far as I recall.

And, yes, it uses a format of 0xRRGGBB, as is used in the default STV's theme.properties files.

Andy

CollegeProject 11-08-2016 03:14 PM

Quote:

Originally Posted by Opus4 (Post 595217)
I'm curious: are you setting the theme value via the GetProperty call or by using =SomeVariableName?

Setting it dynamically using a variable name, instead of using the API call, ought to work, as far as I recall.

And, yes, it uses a format of 0xRRGGBB, as is used in the default STV's theme.properties files.

Andy

I've tried both somevariable and properties they just aren't instantly updated but like said above they are on a refresh of the menu but if the values or variables change in-between they aren't refreshed with the areas. No biggie I changed the way I was displaying.


All times are GMT -6. The time now is 08:28 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.