Skip to content

Commit

Permalink
Revert to hiding unfocused widgets on Home2/3.
Browse files Browse the repository at this point in the history
But fix the Media Overlay extended text visibility.

Also merges Playlist widget into the common Veritcal List widget.

Updates fix for Issue #342.
  • Loading branch information
MacGyverr authored and jingai committed Sep 25, 2015
1 parent 2b5c46a commit a325f1d
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 137 deletions.
2 changes: 1 addition & 1 deletion 720p/Includes_Home2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
<ondown>9001</ondown>
<onleft>9000</onleft>
<onright>9000</onright>
<visible allowhiddenfocus="true">![Control.HasFocus(8000) | Control.HasFocus(8001) | Control.HasFocus(8002) | Control.HasFocus(8003)] + Control.HasFocus(9001)</visible>
<visible allowhiddenfocus="true">Control.HasFocus(9001) + ![Control.HasFocus(8000) | Control.HasFocus(8001) | Control.HasFocus(8002) | Control.HasFocus(8003)]</visible>
<orientation>vertical</orientation>
<defaultcontrol always="true">1</defaultcontrol>
<scrolltime tween="sine" easing="out">240</scrolltime>
Expand Down
2 changes: 1 addition & 1 deletion 720p/Includes_Home3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
<onleft>9000</onleft>
<onright>9000</onright>
<orientation>vertical</orientation>
<visible allowhiddenfocus="true">![Control.HasFocus(8000) | Control.HasFocus(8001) | Control.HasFocus(8002) | Control.HasFocus(8003)] + Control.HasFocus(9001)</visible>
<visible allowhiddenfocus="true">Control.HasFocus(9001) + ![Control.HasFocus(8000) | Control.HasFocus(8001) | Control.HasFocus(8002) | Control.HasFocus(8003)]</visible>
<defaultcontrol always="true">1</defaultcontrol>
<scrolltime tween="sine" easing="out">240</scrolltime>
<itemlayout width="300" height="20">
Expand Down
162 changes: 27 additions & 135 deletions 720p/Includes_HomeDeck.xml
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@
</include>

<include name="HomeDeck">
<control type="group">
<control type="group" id="9004">
<animation effect="fade" start="100" end="0" time="0" condition="[Skin.HasSetting(Home2) | Skin.HasSetting(Home3)] + Control.HasFocus(9001)">conditional</animation>
<animation effect="fade" start="0" end="100" delay="200" time="200" condition="[Skin.HasSetting(Home2) | Skin.HasSetting(Home3)] + !Control.HasFocus(9001)">conditional</animation>

Expand All @@ -306,7 +306,7 @@
<include condition="![Skin.HasSetting(Home2) | Skin.HasSetting(Home3)]">RecentlyAddedArrow1</include>
<include condition="Skin.HasSetting(Home2)">RecentlyAddedArrow2</include>
<include condition="Skin.HasSetting(Home3)">RecentlyAddedArrow3</include>
<visible>!IsEmpty(Container(9000).ListItem.Property(widget)) + ![[StringCompare(Container(9000).ListItem.Property(Widget),PVR) + !PVR.IsRecording] + [StringCompare(Container(9000).ListItem.Property(Widget),PVR) + !PVR.HasNonRecordingTimer]]</visible>
<visible>!IsEmpty(Container(9000).ListItem.Property(widget))</visible>
<visible>![Control.HasFocus(8000) | Control.HasFocus(8001) | Control.HasFocus(8002) | Control.HasFocus(8003)]</visible>
</control>
<!-- Widget titles for all home views -->
Expand All @@ -316,87 +316,43 @@
<include condition="Skin.HasSetting(Home3)">RecentlyAddedTitle3</include>
<label>[B]$INFO[Container(9000).ListItem.Property(widgetName)][/B]</label>
<shadowcolor>ff000000</shadowcolor>
<visible>!IsEmpty(Container(9000).ListItem.Property(widget)) + ![[StringCompare(Container(9000).ListItem.Property(Widget),PVR) + !PVR.IsRecording] + [StringCompare(Container(9000).ListItem.Property(Widget),PVR) + !PVR.HasNonRecordingTimer]]</visible>
<visible>!IsEmpty(Container(9000).ListItem.Property(widget))</visible>
<visible>![Control.HasFocus(8000) | Control.HasFocus(8001) | Control.HasFocus(8002) | Control.HasFocus(8003)]</visible>
</control>
</control>

<!-- Widgets -->
<control type="group" id="9002">
<!-- Vertical List Widget thumbnail -->
<!-- Widget Menus -->
<control type="group">
<control type="image">
<include>Animation_CommonFade</include>
<include>Animation_FadedByMenu</include>
<posx>265</posx>
<posy>560</posy>
<width>250</width>
<height>140</height>
<aspectratio align="right" aligny="center">keep</aspectratio>
<bordertexture border="6">frames/thumb_border.png</bordertexture>
<bordersize>6</bordersize>
<texture diffuse="frames/EpisodeMatte.png">$INFO[Container(8000).ListItem.Icon]</texture>
<visible>!IsEmpty(Container(9000).ListItem.Property(widget)) + ![StringCompare(Container(9000).ListItem.Property(Widget),Playlist) | StringCompare(Container(9000).ListItem.Property(Widget),PVR) | StringCompare(Container(9000).ListItem.Property(Widget),WeatherForecast)]</visible>
<visible>!IsEmpty(Container(9000).ListItem.Property(widget)) | [![Skin.HasSetting(Home2) | Skin.HasSetting(Home3)] + !Control.HasFocus(9001) + !IsEmpty(Container(9000).ListItem.Property(widget))]</visible>
<control type="button" id="8001">
<description>Fake button for picture-based widgets</description>
<onup>Control.Move(8000,-1)</onup>
<ondown>Control.Move(8000,1)</ondown>
<onleft>9000</onleft>
<onright>9000</onright>
<onclick condition="IsEmpty(Container(8000).ListItem.PicturePath)">ShowPicture($INFO[Container(8000).ListItem.Thumb])</onclick>
<visible>StringCompare(Container(9000).ListItem.Property(widgetType),pictures)</visible>
</control>
</control>

<!-- Playlist Widget thumbnails -->
<control type="group">
<control type="image">
<include>Animation_CommonFade</include>
<include>Animation_CommonFadeNoHide</include>
<include>Animation_FadedByMenu</include>
<description>Vertical Widget list Icon</description>
<posx>265</posx>
<posy>560</posy>
<width>250</width>
<height>140</height>
<aspectratio align="right" aligny="center">keep</aspectratio>
<bordertexture border="6">frames/thumb_border.png</bordertexture>
<bordersize>6</bordersize>
<texture diffuse="frames/EpisodeMatte.png">$INFO[Container(8001).ListItem.Icon]</texture>
<visible>!IsEmpty(Container(9000).ListItem.Property(widget)) + StringCompare(Container(9000).ListItem.Property(Widget),Playlist)</visible>
</control>
</control>

<!-- Widget Menus -->

<!-- Vertical List Widget -->
<control type="group">
<control type="button" id="7999">
<description>Fake button for picture-based widgets</description>
<onup>Control.Move(8000,-1)</onup>
<ondown>Control.Move(8000,1)</ondown>
<onleft>9000</onleft>
<onright>9000</onright>
<onclick condition="IsEmpty(Container(8000).ListItem.PicturePath)">ShowPicture($INFO[Container(8000).ListItem.Thumb])</onclick>
<visible>!IsEmpty(Container(9000).ListItem.Property(widgetType)) + StringCompare(Container(9000).ListItem.Property(widgetType),pictures)</visible>
<texture diffuse="frames/EpisodeMatte.png">$INFO[Container(8000).ListItem.Icon]</texture>
<visible>[![Skin.HasSetting(Home2) | Skin.HasSetting(Home3)] + !Control.HasFocus(9001) + !IsEmpty(Container(9000).ListItem.Property(widget))] | [Control.HasFocus(8000) | Control.HasFocus(8001) | Control.HasFocus(8002) | Control.HasFocus(8003)]</visible>
</control>
<control type="list" id="8000">
<include>Global_Widget</include>
<description>Widget Lists</description>
<include>Global_VerticalListWidget</include>
<content target="$VAR[GlobalWidgetType]">$VAR[GlobalWidgetContent]</content>
<visible>!IsEmpty(Container(9000).ListItem.Property(widget)) + ![StringCompare(Container(9000).ListItem.Property(Widget),Playlist) | StringCompare(Container(9000).ListItem.Property(Widget),PVR) | StringCompare(Container(9000).ListItem.Property(Widget),WeatherForecast)]</visible>
</control>
</control>

<!-- Playlist Widget -->
<control type="group">
<visible>StringCompare(Container(9000).ListItem.Property(Widget),Playlist)</visible>
<control type="label">
<posx>533</posx>
<posy>617</posy>
<width>500</width>
<height>27</height>
<align>left</align>
<aligny>center</aligny>
<scrollout>false</scrollout>
<pauseatend>600</pauseatend>
<scrollspeed>20</scrollspeed>
<font>METF_RecentlyAddedListText</font>
<textcolor>RecentlyAddedNF</textcolor>
<visible>Control.HasFocus(8001) + IsEmpty(Container(8001).ListItem.Label)</visible>
</control>
<control type="list" id="8001">
<include>Playlist_Widget</include>
<content>$INFO[Container(9000).ListItem.Property(widgetPlaylist)]</content>
</control>
</control>

Expand Down Expand Up @@ -435,7 +391,7 @@
<control type="group">
<left>470</left>
<top>554</top>
<visible>!IsEmpty(Container(9000).ListItem.Property(widget)) + StringCompare(Container(9000).ListItem.Property(Widget),PVR) + [PVR.IsRecording | PVR.HasNonRecordingTimer]</visible>
<visible>[Control.HasFocus(8002) | Skin.HasSetting(Home1)] + !IsEmpty(Container(9000).ListItem.Property(widget)) + StringCompare(Container(9000).ListItem.Property(Widget),PVR) + [PVR.IsRecording | PVR.HasNonRecordingTimer]</visible>
<animation effect="fade" start="100" end="0" time="200" condition="Window.IsActive(Favourites)">conditional</animation>
<control type="group">
<animation effect="slide" start="0,0" end="0,80" time="0" condition="PVR.IsRecording">conditional</animation>
Expand Down Expand Up @@ -573,7 +529,7 @@
<height>WeatherHomeHeight</height>
<orientation>horizontal</orientation>
<itemgap>5</itemgap>
<visible>!IsEmpty(Container(9000).ListItem.Property(widget)) + StringCompare(Container(9000).ListItem.Property(Widget),WeatherForecast)</visible>
<visible>[Control.HasFocus(8003) | Skin.HasSetting(Home1)] + !IsEmpty(Container(9000).ListItem.Property(widget)) + StringCompare(Container(9000).ListItem.Property(Widget),WeatherForecast)</visible>
<!-- Current Day Forecast -->
<control type="group">
<width>WeatherHomeWidth</width>
Expand Down Expand Up @@ -939,9 +895,9 @@
</control>
</include>

<!-- Widget list elements -->
<include name="Global_Widget">
<include>Animation_CommonFade</include>
<!-- Vertical List Widget elements -->
<include name="Global_VerticalListWidget">
<include>Animation_CommonFadeNoHide</include>
<include>Animation_FadedByMenu</include>
<animation effect="fade" start="100" end="0" time="0">Hidden</animation>
<animation effect="fade" start="0" end="100" time="200" delay="100" >Visible</animation>
Expand Down Expand Up @@ -974,6 +930,7 @@
<font>METF_RecentlyAddedListText</font>
<textcolor>RecentlyAddedNF</textcolor>
<label>$VAR[GlobalWidgetLabel]</label>
<visible>[![Skin.HasSetting(Home2) | Skin.HasSetting(Home3)] + !Control.HasFocus(9001) + !IsEmpty(Container(9000).ListItem.Property(widget))] | [Control.HasFocus(8000) | Control.HasFocus(8001) | Control.HasFocus(8002) | Control.HasFocus(8003)]</visible>
</control>
</itemlayout>
<focusedlayout width="510" height="27">
Expand All @@ -986,7 +943,7 @@
<aligny>center</aligny>
<texture>FocusLine.png</texture>
<colordiffuse>FocusBar</colordiffuse>
<visible>[Control.HasFocus(8000) | Control.HasFocus(7999)] </visible>
<visible>[Control.HasFocus(8000) | Control.HasFocus(8001)]</visible>
</control>
<control type="label">
<posx>10</posx>
Expand All @@ -1001,72 +958,7 @@
<font>METF_RecentlyAddedListText</font>
<textcolor>FocusBarText</textcolor>
<label>$VAR[GlobalWidgetLabel]</label>
</control>
</focusedlayout>
</include>

<include name="Playlist_Widget">
<include>Animation_CommonFade</include>
<include>Animation_FadedByMenu</include>
<visible allowhiddenfocus="true">StringCompare(Container(9000).ListItem.Property(Widget),Playlist)</visible>
<animation effect="fade" start="100" end="0" time="0">Hidden</animation>
<animation effect="fade" start="0" end="100" time="200" delay="100" >Visible</animation>
<animation effect="slide" start="0,0" end="0,54" time="0" condition="StringCompare(Container(8001).NumItems,1)">conditional</animation>
<animation effect="slide" start="0,0" end="0,44" time="0" condition="StringCompare(Container(8001).NumItems,2)">conditional</animation>
<animation effect="slide" start="0,0" end="0,28" time="0" condition="StringCompare(Container(8001).NumItems,3)">conditional</animation>
<animation effect="slide" start="0,0" end="0,14" time="0" condition="StringCompare(Container(8001).NumItems,4)">conditional</animation>
<posx>522</posx>
<posy>563</posy>
<width>510</width>
<height>135</height>
<onup>8001</onup>
<ondown>8001</ondown>
<onleft>9000</onleft>
<onright>9000</onright>
<viewtype>list</viewtype>
<orientation>vertical</orientation>
<scrolltime>200</scrolltime>
<itemlayout width="510" height="27">
<control type="label">
<posx>10</posx>
<posy>-2</posy>
<width>500</width>
<height>27</height>
<align>left</align>
<aligny>center</aligny>
<scrollout>false</scrollout>
<pauseatend>600</pauseatend>
<scrollspeed>20</scrollspeed>
<font>METF_RecentlyAddedListText</font>
<textcolor>RecentlyAddedNF</textcolor>
<label>$INFO[ListItem.Label]</label>
</control>
</itemlayout>
<focusedlayout width="510" height="27">
<!-- Focus Bar -->
<control type="image">
<posx>0</posx>
<posy>0</posy>
<width>510</width>
<height>27</height>
<aligny>center</aligny>
<texture>FocusLine.png</texture>
<colordiffuse>FocusBar</colordiffuse>
<visible>Control.HasFocus(8001)</visible>
</control>
<control type="label">
<posx>10</posx>
<posy>-2</posy>
<width>500</width>
<height>27</height>
<align>left</align>
<aligny>center</aligny>
<scrollout>false</scrollout>
<pauseatend>600</pauseatend>
<scrollspeed>20</scrollspeed>
<font>METF_RecentlyAddedListText</font>
<textcolor>FocusBarText</textcolor>
<label>$INFO[ListItem.Label]</label>
<visible>[![Skin.HasSetting(Home2) | Skin.HasSetting(Home3)] + !Control.HasFocus(9001) + !IsEmpty(Container(9000).ListItem.Property(widget))] | [Control.HasFocus(8000) | Control.HasFocus(8001) | Control.HasFocus(8002) | Control.HasFocus(8003)]</visible>
</control>
</focusedlayout>
</include>
Expand Down
9 changes: 9 additions & 0 deletions 720p/Includes_Variables.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
<value condition="StringCompare(Container(9000).ListItem.Property(Widget),PremiereShows)">plugin://script.extendedinfo?info=premiereshows</value>
<value condition="StringCompare(Container(9000).ListItem.Property(Widget),XKCD)">plugin://script.extendedinfo?info=xkcd</value>
<value condition="StringCompare(Container(9000).ListItem.Property(Widget),Cyanide)">plugin://script.extendedinfo?info=cyanide</value>
<value>$INFO[Container(9000).ListItem.Property(widgetPlaylist)]</value>
</variable>

<!-- setting the dynamic content target variable -->
Expand All @@ -142,9 +143,17 @@
<value condition="StringCompare(Container(9000).ListItem.Property(Widget),LDPRecommendedAlbums)">$INFO[ListItem.Artist] - $INFO[ListItem.Title] ($INFO[ListItem.Year])</value>
<value condition="StringCompare(Container(9000).ListItem.Property(Widget),LDPRandomAlbums)">$INFO[ListItem.Artist] - $INFO[ListItem.Title] ($INFO[ListItem.Year])</value>
<value condition="StringCompare(Container(9000).ListItem.Property(Widget),LDPRandomSongs)">$INFO[ListItem.Artist] - $INFO[ListItem.Title]</value>

<!-- fixing the playlists content labels-->
<value condition="StringCompare(Container(9000).ListItem.Property(Widget),Playlist) + IsEmpty(Container(8000).ListItem.TVshowTitle)">$INFO[ListItem.Title] ($INFO[ListItem.Year])</value>
<value condition="StringCompare(Container(9000).ListItem.Property(Widget),Playlist) + !IsEmpty(Container(8000).ListItem.TVshowTitle)">$INFO[ListItem.TVshowTitle] - $INFO[ListItem.Season]x$INFO[ListItem.Episode] - $INFO[ListItem.Title]</value>
<value>$INFO[ListItem.Label]</value>
</variable>

<variable name="GlobalWidgetIcon">
<value>$INFO[ListItem.Icon]</value>
</variable>

<variable name="RatingColor">
<value condition="!SubString(ListItem.Votes,$COMMA)">FFFF0000</value>
<value condition="SubString(ListItem.Votes,1$COMMA,Left)">FFFF5555</value>
Expand Down

2 comments on commit a325f1d

@MacGyverr
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tend to avoid using Skin.HasSetting(Home1), because when it's a new install, that bool isn't set yet, and if they never change from 1 to anything else then back, it is never set. That's why you see me using "![Skin.HasSetting(Home2) | Skin.HasSetting(Home3)]" everywhere.

@jingai
Copy link
Collaborator

@jingai jingai commented on a325f1d Sep 25, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, good point. I'll fix that.

Please sign in to comment.