Kodi Community Forum

Full Version: Auto-sizing labels with background colour?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to have a solid block of colour behind an auto-sizing label which adopts the same width?
Use a button control?
Would the button resize to fit the label, though, rather than a texture?
the label, but you can use textoffsetx/y to control the texture width/height.
We use this for metacritic rating box. Although I fix it at 45 width, auto can be used to stretch it fine Smile

Code:
                    <control type="button">
                        <width>auto</width>
                        <height>45</height>
                        <textcolor>black</textcolor>
                        <textoffsetx>0</textoffsetx>
                        <label>$INFO[Window(Home).Property(SkinHelper.MetaCritic.Rating)]</label>
                        <font>TinyBold</font>
                        <aligny>center</aligny>
                        <align>center</align>
                        <texturefocus colordiffuse="$VAR[CommunityRatingColour]">metacritic_box.png</texturefocus>
                        <texturenofocus colordiffuse="$VAR[CommunityRatingColour]">metacritic_box.png</texturenofocus>
                        <visible>!IsEmpty(Window(Home).Property(SkinHelper.MetaCritic.Rating))</visible>
                        <visible>!String.IsEqual(Window(Home).Property(SkinHelper.MetaCritic.Rating),n/a)</visible>
                    </control>
For the label is that all you have to do to get skin helper service to pull info? O do you have to run script somewhere and set the property... Becuase I have yet to figure out how to get skin helper to work.... I know I am a noob... But really is that all ?
(2017-01-15, 14:26)smitchell6879 Wrote: [ -> ]For the label is that all you have to do to get skin helper service to pull info? O do you have to run script somewhere and set the property... Becuase I have yet to figure out how to get skin helper to work.... I know I am a noob... But really is that all ?

I have the same question. I have that label but no information is pulled
The window property names changed, check skin helper wiki.