Skip to content

Commit

Permalink
[Widgets Settings] added settings widget (beatmasterRS#465)
Browse files Browse the repository at this point in the history
* [Widgets Settings] added settings widget

* Update Includes_SubItems_Home.xml

* Update Includes_SubItems_Home.xml

* Update Includes_SubItems_Home.xml

* [Code] improvements
  • Loading branch information
beatmasterRS authored Aug 16, 2021
1 parent 71a336b commit a2b19d9
Show file tree
Hide file tree
Showing 4 changed files with 156 additions and 6 deletions.
9 changes: 8 additions & 1 deletion 1080i/Includes_Home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4362,6 +4362,9 @@
</include>

<include name="InfoSubWidgetSystem">
<param name="issettingslayout" value="$PARAM[issettingslayout]" default="false"/>
<param name="id" value="$PARAM[id]"/>
<definition>
<include content="def_top" condition="Skin.HasSetting(homemenu.clean.flix) + [Skin.HasSetting(home.oldmenuheight) | Skin.HasSetting(submenu.compatibility)] + !Skin.HasSetting(hidewidgettitle)">
<param name="top" value="-386" />
</include>
Expand All @@ -4387,7 +4390,11 @@
<param name="top" value="-427" />
</include>
<left>527</left>
<include>InfoSubWidgetSystemInclude</include>
<include condition="!$PARAM[issettingslayout]">InfoSubWidgetSystemInclude</include>
<include condition="$PARAM[issettingslayout]" content="InfoSubWidgetSettingsInclude">
<param name="id" value="$PARAM[id]"/>
</include>
</definition>
</include>

<include name="MultiWidgetsHeaderLabel">
Expand Down
28 changes: 28 additions & 0 deletions 1080i/Includes_SubItems_Home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -374,4 +374,32 @@
</control>
</control>
</include>

<include name="InfoSubWidgetSettingsInclude">
<control type="group">
<animation effect="slide" start="0" end="0,385" time="0" condition="[Integer.IsEqual(Container(301).NumItems,1) + !String.IsEqual(Container(300).ListItem.Property(widgetFullscreen),yes)] + !Skin.HasSetting(homemenu.netflix) + !Skin.HasSetting(home.widgets.show.reflections)">Conditional</animation>
<animation effect="slide" start="0" end="0,415" time="0" condition="[Integer.IsEqual(Container(301).NumItems,1) + !String.IsEqual(Container(300).ListItem.Property(widgetFullscreen),yes)] + !Skin.HasSetting(homemenu.netflix) + Skin.HasSetting(home.widgets.show.reflections)">Conditional</animation>
<include>Animation.Vertical.Widgets.Label</include>
<control type="grouplist">
<left>0</left>
<orientation>vertical</orientation>
<itemgap>14</itemgap>
<include content="MultiWidgetsHeaderLabel">
<param name="label" value="$INFO[Container($PARAM[id]).ListItem.Label]" />
<param name="visible" value="true" />
</include>
<include condition="Skin.HasSetting(homemenu.netflix)">IntentButton</include>
<control type="textbox">
<include content="def_height" condition="Skin.HasSetting(homemenu.clean.flix)">
<param name="height" value="216" />
</include>
<height min="36" max="252">auto</height>
<align>left</align>
<font>Tiny</font>
<textcolor>Dark2</textcolor>
<label>$INFO[Container($PARAM[id]).ListItem.Label2]</label>
</control>
</control>
</control>
</include>
</includes>
1 change: 1 addition & 0 deletions shortcuts/overrides.xml
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,7 @@
</node>
<node label="$LOCALIZE[130]">
<shortcut widget="systeminfo" type="31452" label="$LOCALIZE[130]" icon="special://skin/extras/icons/sysinfo.png" widgetType="system" widgetTarget="system">$INCLUDE[skinshortcuts-template-SystemInfoContent]</shortcut>
<shortcut widget="settings" type="31452" label="$LOCALIZE[5]" icon="special://skin/extras/icons/sysinfo.png" widgetType="system" widgetTarget="system">$INCLUDE[skinshortcuts-template-SettingsInfoContent]</shortcut>
</node>
<node label="$LOCALIZE[1034]" condition="String.IsEqual(Window(Home).Property(skinshortcuts-Widget),1)">
<shortcut widget="mysubmenu" type="31452" label="$LOCALIZE[1034]" icon="DefaultAddon.png" widgetType="addons" widgetTarget="programs">$INCLUDE[skinshortcuts-submenu]</shortcut>
Expand Down
124 changes: 119 additions & 5 deletions shortcuts/template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,91 @@
</item>
</controls>
</other>

<!-- Widget for Settings -->
<other include="SettingsInfoContent">
<controls>
<item id="1">
<label>14206</label>
<label2>31275</label2>
<icon>special://skin/extras/icons/paintbrush.png</icon>
<onclick>ActivateWindow(InterfaceSettings)</onclick>
</item>
<item id="2">
<label>14202</label>
<label2>31276</label2>
<icon>special://skin/extras/icons/tags.png</icon>
<onclick>ActivateWindow(MediaSettings)</onclick>
</item>
<item id="3">
<label>14200</label>
<label2>31277</label2>
<icon>special://skin/extras/icons/equalizer.png</icon>
<onclick>ActivateWindow(PlayerSettings)</onclick>
</item>
<item id="12">
<label>20077</label>
<label2>31166</label2>
<icon>special://skin/extras/icons/year.png</icon>
<onclick>ActivateWindow(SkinSettings)</onclick>
</item>
<item id="8">
<label>13000</label>
<label2>31161</label2>
<icon>special://skin/extras/icons/configure.png</icon>
<onclick>ActivateWindow(SystemSettings)</onclick>
</item>
<item id="7">
<label>14036</label>
<label2>31164</label2>
<icon>special://skin/extras/icons/network.png</icon>
<onclick>ActivateWindow(servicesettings)</onclick>
</item>
<item id="9">
<label>13200</label>
<label2>31165</label2>
<icon>special://skin/extras/icons/actor.png</icon>
<onclick>ActivateWindow(Profiles)</onclick>
</item>
<item id="4">
<label>24001</label>
<label2>31162</label2>
<icon>special://skin/extras/icons/addons.png</icon>
<onclick>ActivateWindow(AddonBrowser)</onclick>
</item>
<item id="10">
<label>130</label>
<label2>31167</label2>
<icon>special://skin/extras/icons/sysinfo.png</icon>
<onclick>ActivateWindow(7)</onclick>
</item>
<item id="11">
<label>19191</label>
<label2>31163</label2>
<icon>special://skin/extras/icons/livetv.png</icon>
<onclick>ActivateWindow(pvrsettings)</onclick>
</item>
<item id="5">
<label>LibreELEC $LOCALIZE[5]</label>
<label2>31373</label2>
<icon>special://skin/extras/icons/libreelec.png</icon>
<onclick>RunScript(service.libreelec.settings)</onclick>
<visible>System.HasAddon(service.libreelec.settings)</visible>
</item>
<item id="6">
<label>CoreELEC $LOCALIZE[5]</label>
<label2>31374</label2>
<icon>special://skin/extras/icons/coreelec.png</icon>
<onclick>RunScript(service.coreelec.settings)</onclick>
<visible>System.HasAddon(service.coreelec.settings)</visible>
</item>
<item id="14">
<label>$LOCALIZE[7]</label>
<icon>special://skin/extras/icons/filemanager.png</icon>
<onclick>ActivateWindow(filemanager)</onclick>
</item>
</controls>
</other>

<!-- Widget 1 -->
<other include="widget-vertical.1">
Expand All @@ -598,6 +683,8 @@
<property name="isnormallayout" tag="property" attribute="name|widgetTarget" value="system">false</property>
<property name="isnormallayout" tag="property" attribute="name|widget" value="mysubmenu">false</property>
<property name="isnormallayout">true</property>
<property name="issettingslayout" tag="property" attribute="name|widget" value="settings">true</property>
<property name="issettingslayout">false</property>
<property name="issystemlayout" tag="property" attribute="name|widgetTarget" value="system">true</property>
<property name="issystemlayout">false</property>
<property name="issubmenulayout" tag="property" attribute="name|widget" value="mysubmenu">true</property>
Expand Down Expand Up @@ -772,6 +859,8 @@
<include condition="$SKINSHORTCUTS[issystemlayout]" content="InfoSubWidgetSystem">
<param name="fadecondition" value="!Control.HasFocus(301$SKINSHORTCUTS[id]2) + !Control.HasFocus(301$SKINSHORTCUTS[id]3)"/>
<param name="includefadecondition" value="true"/>
<param name="issettingslayout" value="$SKINSHORTCUTS[issettingslayout]"/>
<param name="id" value="301$SKINSHORTCUTS[id]1"/>
</include>
</control>
<control type="grouplist">
Expand All @@ -795,6 +884,8 @@
<property name="isnormallayout" tag="property" attribute="name|widgetTarget.2" value="weather">false</property>
<property name="isnormallayout" tag="property" attribute="name|widgetTarget.2" value="system">false</property>
<property name="isnormallayout">true</property>
<property name="issettingslayout" tag="property" attribute="name|widget.2" value="settings">true</property>
<property name="issettingslayout">false</property>
<property name="issystemlayout" tag="property" attribute="name|widgetTarget.2" value="system">true</property>
<property name="issystemlayout">false</property>
<property name="isweatherlayout" tag="property" attribute="name|widgetTarget.2" value="weather">true</property>
Expand Down Expand Up @@ -951,7 +1042,10 @@
</control>
<control type="grouplist">
<skinshortcuts>visibility</skinshortcuts>
<include condition="$SKINSHORTCUTS[issystemlayout]">InfoSubWidgetSystem</include>
<include condition="$SKINSHORTCUTS[issystemlayout]" content="InfoSubWidgetSystem">
<param name="issettingslayout" value="$SKINSHORTCUTS[issettingslayout]"/>
<param name="id" value="301$SKINSHORTCUTS[id]2" />
</include>
</control>
<control type="grouplist">
<skinshortcuts>visibility</skinshortcuts>
Expand All @@ -974,6 +1068,8 @@
<property name="isnormallayout" tag="property" attribute="name|widgetTarget.3" value="weather">false</property>
<property name="isnormallayout" tag="property" attribute="name|widgetTarget.3" value="system">false</property>
<property name="isnormallayout">true</property>
<property name="issettingslayout" tag="property" attribute="name|widget.3" value="settings">true</property>
<property name="issettingslayout">false</property>
<property name="issystemlayout" tag="property" attribute="name|widgetTarget.3" value="system">true</property>
<property name="issystemlayout">false</property>
<property name="isweatherlayout" tag="property" attribute="name|widgetTarget.3" value="weather">true</property>
Expand Down Expand Up @@ -1129,7 +1225,10 @@
</control>
<control type="grouplist">
<skinshortcuts>visibility</skinshortcuts>
<include condition="$SKINSHORTCUTS[issystemlayout]">InfoSubWidgetSystem</include>
<include condition="$SKINSHORTCUTS[issystemlayout]" content="InfoSubWidgetSystem">
<param name="issettingslayout" value="$SKINSHORTCUTS[issettingslayout]"/>
<param name="id" value="301$SKINSHORTCUTS[id]3" />
</include>
</control>
<control type="grouplist">
<skinshortcuts>visibility</skinshortcuts>
Expand All @@ -1152,6 +1251,8 @@
<property name="isnormallayout" tag="property" attribute="name|widgetTarget.4" value="weather">false</property>
<property name="isnormallayout" tag="property" attribute="name|widgetTarget.4" value="system">false</property>
<property name="isnormallayout">true</property>
<property name="issettingslayout" tag="property" attribute="name|widget.4" value="settings">true</property>
<property name="issettingslayout">false</property>
<property name="issystemlayout" tag="property" attribute="name|widgetTarget.4" value="system">true</property>
<property name="issystemlayout">false</property>
<property name="isweatherlayout" tag="property" attribute="name|widgetTarget.4" value="weather">true</property>
Expand Down Expand Up @@ -1307,7 +1408,10 @@
</control>
<control type="grouplist">
<skinshortcuts>visibility</skinshortcuts>
<include condition="$SKINSHORTCUTS[issystemlayout]">InfoSubWidgetSystem</include>
<include condition="$SKINSHORTCUTS[issystemlayout]" content="InfoSubWidgetSystem">
<param name="issettingslayout" value="$SKINSHORTCUTS[issettingslayout]"/>
<param name="id" value="301$SKINSHORTCUTS[id]4" />
</include>
</control>
<control type="grouplist">
<skinshortcuts>visibility</skinshortcuts>
Expand All @@ -1330,6 +1434,8 @@
<property name="isnormallayout" tag="property" attribute="name|widgetTarget.5" value="weather">false</property>
<property name="isnormallayout" tag="property" attribute="name|widgetTarget.5" value="system">false</property>
<property name="isnormallayout">true</property>
<property name="issettingslayout" tag="property" attribute="name|widget.5" value="settings">true</property>
<property name="issettingslayout">false</property>
<property name="issystemlayout" tag="property" attribute="name|widgetTarget.5" value="system">true</property>
<property name="issystemlayout">false</property>
<property name="isweatherlayout" tag="property" attribute="name|widgetTarget.5" value="weather">true</property>
Expand Down Expand Up @@ -1485,7 +1591,10 @@
</control>
<control type="grouplist">
<skinshortcuts>visibility</skinshortcuts>
<include condition="$SKINSHORTCUTS[issystemlayout]">InfoSubWidgetSystem</include>
<include condition="$SKINSHORTCUTS[issystemlayout]" content="InfoSubWidgetSystem">
<param name="issettingslayout" value="$SKINSHORTCUTS[issettingslayout]"/>
<param name="id" value="301$SKINSHORTCUTS[id]5" />
</include>
</control>
<control type="grouplist">
<skinshortcuts>visibility</skinshortcuts>
Expand All @@ -1508,6 +1617,8 @@
<property name="isnormallayout" tag="property" attribute="name|widgetTarget.6" value="weather">false</property>
<property name="isnormallayout" tag="property" attribute="name|widgetTarget.6" value="system">false</property>
<property name="isnormallayout">true</property>
<property name="issettingslayout" tag="property" attribute="name|widget.6" value="settings">true</property>
<property name="issettingslayout">false</property>
<property name="issystemlayout" tag="property" attribute="name|widgetTarget.6" value="system">true</property>
<property name="issystemlayout">false</property>
<property name="isweatherlayout" tag="property" attribute="name|widgetTarget.6" value="weather">true</property>
Expand Down Expand Up @@ -1663,7 +1774,10 @@
</control>
<control type="grouplist">
<skinshortcuts>visibility</skinshortcuts>
<include condition="$SKINSHORTCUTS[issystemlayout]">InfoSubWidgetSystem</include>
<include condition="$SKINSHORTCUTS[issystemlayout]" content="InfoSubWidgetSystem">
<param name="issettingslayout" value="$SKINSHORTCUTS[issettingslayout]"/>
<param name="id" value="301$SKINSHORTCUTS[id]6" />
</include>
</control>
<control type="grouplist">
<skinshortcuts>visibility</skinshortcuts>
Expand Down

0 comments on commit a2b19d9

Please sign in to comment.