Use of Boolean with Themes
#1
This is simple but I am learning skins and I can't figure this one out properly.

Simply trying to use a boolean to show a shadow when default theme, and no shadow when theme is selected.

<shadowcolor condition="!Skin.HasTheme(WhiteFlat)">ff851e19</shadowcolor>
<shadowcolor>shadow</shadowcolor>

That's what I had last (which is wrong)...right now the top line shadow shows whether my theme is selected or not.
Reply
#2
Example:

Code:
<control type="label">
....
<shadowcolor>$VAR[ThemeShadowColor]</shadowcolor>
</control>

Code:
<variable name="ThemeShadowColor">
<value condition="!Skin.HasTheme(WhiteFlat)">ff851e19</value>
</variable>

OR

Code:
<control type="label">
....
<include condition="!Skin.HasTheme(WhiteFlat)">ThemeShadowColor</include>
</control>

Code:
<include name="ThemeShadowColor">
<shadowcolor>ff851e19</shadowcolor>
</include>
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
#3
I should have posted the entire code block but I will work with your suggestoins and see if I can figure it out thank you Smile

Code:
                    <!-- Date & Time -->
                    <control type="label" id="9025">
                        <width min="10" max="1780">auto</width>
                        <height>41</height>
                        <label>$INFO[System.Date,[COLOR grey], | [/COLOR]]$INFO[System.Time]</label>
                        <font>font13_title</font>
                        <textcolor>$VAR[Colour_HomeWindowThemeColourVar]</textcolor>
                        <!--<shadowcolor condition="!Skin.HasTheme(WhiteFlat)">ff851e19</shadowcolor>-->
                        <shadowcolor>shadow</shadowcolor>
                    </control>

My thought was maybe I just had to dupe the entire block one with and one without the shadow.

For some reason the boolean doesn't trigger when I apply my theme..not sure why.
Reply
#4
You can change a Skin.String in defaults.xml to enable / disable shadows [rather than code them all per label], I did it here.. Big Grin

https://github.com/BADMS/skin.mimix/blob...ts.xml#L17

or ofc. use a string for all shadows in labels..
Reply

Logout Mark Read Team Forum Stats Members Help
Use of Boolean with Themes0