Skip to content

Commit

Permalink
time_widget
Browse files Browse the repository at this point in the history
  • Loading branch information
realcopacetic committed Jul 16, 2024
1 parent 1d1b1d4 commit eaf944f
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 96 deletions.
206 changes: 111 additions & 95 deletions 16x9/Components_Home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -339,138 +339,154 @@
</include>

<include name="Home_Time_Widget">
<include content="Time_Widget">
<param name="visible" value="![$EXP[Music_Player_IsVisible] | $EXP[Music_Player_HasFocus] | Window.IsVisible(volumebar) | Window.IsVisible(notification) | Window.IsVisible(extendedprogressdialog)] | Window.IsVisible(shutdownmenu)" />
<param name="include_date_and_weather" value="Skin.String(Time_Widget,Date) | Skin.String(Time_Widget,Weather)" />
<param name="include_weather" value="Skin.String(Time_Widget,Weather)" />
<param name="textcolor" value="$VAR[Notification_Widget_Label_Color]" />
</include>
<param name="visible" default="![$EXP[Music_Player_IsVisible] | $EXP[Music_Player_HasFocus] | Window.IsVisible(volumebar) | Window.IsVisible(notification) | Window.IsVisible(extendedprogressdialog)] | Window.IsVisible(shutdownmenu)" />
<param name="textcolor" default="$VAR[Notification_Widget_Label_Color]" />
<definition>
<include content="Clock" condition="!Skin.String(Time_Widget,Date) + !Skin.String(Time_Widget,Weather)">
<param name="visible" value="$PARAM[visible]" />
<param name="textcolor" value="$PARAM[textcolor]" />
</include>
<include content="Time_Widget" condition="Skin.String(Time_Widget,Date) | Skin.String(Time_Widget,Weather)">
<param name="visible" value="$PARAM[visible]" />
<param name="include_weather" value="Skin.String(Time_Widget,Weather)" />
<param name="textcolor" value="$PARAM[textcolor]" />
</include>
</definition>
</include>

<include name="Clock">
<param name="visible" default="true" />
<param name="textcolor" default="$VAR[Light_Color]" />
<definition>
<control type="group">
<visible>$PARAM[visible]</visible>
<include content="VisibleHidden_Fade_Animation" />
<right>0</right>
<top>0</top>
<width>180</width>
<height>180</height>
<control type="grouplist">
<left>15</left>
<right>15</right>
<centertop>50%</centertop>
<height>70</height>
<align>center</align>
<itemgap>3</itemgap>
<orientation>horizontal</orientation>
<usecontrolcoords>true</usecontrolcoords>
<control type="label">
<width>auto</width>
<height>70</height>
<font>Main_Menu_Focused</font>
<align>right</align>
<aligny>center</aligny>
<textcolor>$PARAM[textcolor]</textcolor>
<label>$INFO[System.Time(hh)]</label>
</control>
<control type="label">
<width>auto</width>
<height>55</height>
<top>13</top>
<font>Main_Menu_Unfocused</font>
<align>left</align>
<aligny>center</aligny>
<textcolor>$PARAM[textcolor]</textcolor>
<label>$INFO[System.Time(mm)]</label>
</control>
</control>
</control>
</definition>
</include>

<include name="Time_Widget">
<param name="visible" default="true" />
<param name="include_date_and_weather" default="true" />
<param name="include_weather" default="true" />
<param name="textcolor" default="$VAR[Light_Color]" />
<definition>
<control type="group">
<control type="grouplist">
<visible>$PARAM[visible]</visible>
<include content="VisibleHidden_Fade_Animation" />
<nested />
<include content="Date_And_Weather" condition="$PARAM[include_date_and_weather]">
<param name="include_weather" value="$PARAM[include_weather]" />
<right>60</right>
<top>66</top>
<height>48</height>
<orientation>horizontal</orientation>
<align>right</align>
<itemgap>10</itemgap>
<usecontrolcoords>true</usecontrolcoords>
<include content="Time_Widget_Label_Small">
<param name="label" value="$INFO[System.Date(ddd)]$INFO[System.Date(mmm d),$COMMA ]" />
<param name="textcolor" value="$PARAM[textcolor]" />
</include>
<include content="Clock">
<param name="backgroundcolor" value="$PARAM[backgroundcolor]" />
<include content="Time_Widget_Icon" condition="$PARAM[include_weather]">
<param name="visible" value="!String.IsEqual(Weather.Conditions,$LOCALIZE[503])" />
<param name="texture" value="$INFO[Weather.ConditionsIcon]" />
</include>
<include content="Time_Widget_Label_Small" condition="$PARAM[include_weather]">
<param name="visible" value="!String.IsEmpty(Weather.Temperature)" />
<param name="label" value="$INFO[Weather.Temperature]" />
<param name="textcolor" value="$PARAM[textcolor]" />
</include>
<include content="Time_Widget_Label_Small">
<param name="label" value="$VAR[Copacetic_Divider_Bold]" />
<param name="textcolor" value="$PARAM[textcolor]" />
</include>
<include content="Time_Widget_Label_Large">
<param name="label" value="$INFO[System.Time(hh)]" />
<param name="textcolor" value="$PARAM[textcolor]" />
</include>
<include content="Time_Widget_Label_Small">
<param name="left" value="-7" />
<param name="label" value="$INFO[System.Time(mm)]" />
<param name="textcolor" value="$PARAM[textcolor]" />
</include>
</control>
</definition>
</include>

<include name="Weather_Widget">
<include name="Time_Widget_Label_Large">
<param name="visible" default="true" />
<definition>
<control type="image">
<visible>!String.IsEqual(Weather.Conditions,$LOCALIZE[503])</visible>
<width>33</width>
<height>33</height>
<texture>$INFO[Weather.ConditionsIcon]</texture>
</control>
<control type="label">
<visible>!String.IsEmpty(Weather.Temperature)</visible>
<font>MusicPlayer_Info</font>
<height>33</height>
<left>$PARAM[left]</left>
<visible>$PARAM[visible]</visible>
<font>Title_Breadcrumb_Label</font>
<height>100%</height>
<width>auto</width>
<label>$INFO[Weather.Temperature]</label>
<label>$PARAM[label]</label>
<aligny>center</aligny>
<textcolor>$PARAM[textcolor]</textcolor>
</control>
</definition>
</include>

<include name="Date_And_Weather">
<include name="Time_Widget_Label_Small">
<param name="visible" default="true" />
<param name="right" default="140" />
<param name="textcolor" default="$VAR[Light_Color]" />
<definition>
<control type="grouplist">
<right>$PARAM[right]</right>
<left>0</left>
<top>79</top>
<control type="label">
<left>$PARAM[left]</left>
<visible>$PARAM[visible]</visible>
<font>MusicPlayer_Info</font>
<top>13</top>
<height>33</height>
<orientation>horizontal</orientation>
<align>right</align>
<itemgap>10</itemgap>
<control type="label">
<font>MusicPlayer_Info</font>
<height>100%</height>
<width>auto</width>
<label>$INFO[System.Date(ddd)]$INFO[System.Date(mmm d),$COMMA ]</label>
<aligny>center</aligny>
<textcolor>$PARAM[textcolor]</textcolor>
</control>
<include content="Weather_Widget" condition="Weather.IsFetched + $PARAM[include_weather]">
<param name="textcolor" value="$PARAM[textcolor]" />
</include>
<control type="label">
<font>MusicPlayer_Info</font>
<height>100%</height>
<width>auto</width>
<label>$VAR[Copacetic_Divider_Bold]</label>
<aligny>center</aligny>
<textcolor>$PARAM[textcolor]</textcolor>
</control>
<width>auto</width>
<label>$PARAM[label]</label>
<aligny>center</aligny>
<textcolor>$PARAM[textcolor]</textcolor>
</control>
</definition>
</include>

<include name="Clock">
<include name="Time_Widget_Icon">
<param name="visible" default="true" />
<param name="size" default="180" />
<param name="right" default="0" />
<param name="backgroundcolor" default="$VAR[Blank_Color]" />
<param name="textcolor" default="$VAR[Light_Color]" />
<definition>
<control type="group">
<control type="image">
<left>$PARAM[left]</left>
<visible>$PARAM[visible]</visible>
<right>$PARAM[right]</right>
<top>0</top>
<width>$PARAM[size]</width>
<height>$PARAM[size]</height>
<include content="Visible_Fade_Delayed_Animation" />
<control type="image">
<texture colordiffuse="$PARAM[backgroundcolor]">views/white_100.png</texture>
</control>
<control type="grouplist">
<left>15</left>
<right>15</right>
<centertop>50%</centertop>
<height>48</height>
<align>center</align>
<itemgap>3</itemgap>
<orientation>horizontal</orientation>
<usecontrolcoords>true</usecontrolcoords>
<control type="label">
<width>auto</width>
<height>100%</height>
<font>Title_Breadcrumb_Label</font>
<align>right</align>
<aligny>center</aligny>
<textcolor>$PARAM[textcolor]</textcolor>
<label>$INFO[System.Time(hh)]</label>
</control>
<control type="label">
<width>auto</width>
<height>33</height>
<top>13</top>
<font>MusicPlayer_Info</font>
<align>left</align>
<aligny>center</aligny>
<textcolor>$PARAM[textcolor]</textcolor>
<label>$INFO[System.Time(mm)]</label>
</control>
</control>
<top>13</top>
<height>33</height>
<width>33</width>
<texture>$PARAM[texture]</texture>
</control>
</definition>
</include>
Expand Down
3 changes: 3 additions & 0 deletions 16x9/FileManager.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
<backgroundcolor>$VAR[Dark_Color]</backgroundcolor>
<controls>
<include content="Background_Multiart_Settings" />
<include content="Time_Widget">
<include content="Settings_WindowOpenClose_Fade_Delayed_Long_Animation" />
</include>
<include content="Default_Dialog_Panel_And_Lists_Layout">
<param name="window_name" value="filemanager" />
<param name="left_list_visible" value="![Window.IsVisible(contextmenu) + String.IsEqual(Window(filemanager).Property(ActiveList),Right)]" />
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisc
- Added horizontal layouts for Gridview. In Settings > Copacetic > Views > Grid, you can now choose item layout. The options are 'Vertical small', 'Vertical large' and 'Horizontal' https://github.com/realcopacetic/skin.copacetic/issues/180
- Fixed bug where square widgets were showing fanart even when a thumbnail was available https://github.com/realcopacetic/skin.copacetic/issues/179
- Added new Time widget replacing the Clock. Now in Settings > Copacetic > Home > General, you can choose the furniture to include (None / Clock / Clock and Date / Clock, Date and Weather). Note: For weather to be displayed, you must install a weather addon and make sure it's enabled under Settings > Services > Weather https://github.com/realcopacetic/skin.copacetic/issues/177
- Ability to make new Time widget persistent across the entire home screen (Settings > Copacetic > Home > General). In addition, time widget added to settings screens and shutdown menu dialog. https://github.com/realcopacetic/skin.copacetic/issues/178


Still to do:
Expand Down
2 changes: 1 addition & 1 deletion language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ msgstr ""
#: NEW
#/16x9/Content_Settings.xml
msgctxt "#31728"
msgid "Make persistent across home screen widgets"
msgid "Make persistent across entire home screen, including widgets"
msgstr ""


Expand Down

0 comments on commit eaf944f

Please sign in to comment.