Skip to content

Commit

Permalink
UI updates on Live TV Channel Guide
Browse files Browse the repository at this point in the history
  • Loading branch information
1hitsong committed Nov 6, 2024
1 parent 24ac2f0 commit 8816cee
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 0 deletions.
32 changes: 32 additions & 0 deletions components/liveTv/ChannelInfo.bs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import "pkg:/source/enums/ColorPalette.bs"
import "pkg:/source/utils/misc.bs"

sub init()
m.backdrop = m.top.findNode("backdrop")
m.backdrop.color = "#383838"

m.channelTitle = m.top.findNode("channelTitle")
m.channelTitle.font.size = 27
m.channelTitle.color = "#eeeeee"
end sub

sub onWidthChanged()
m.backdrop.width = m.top.width
m.channelTitle.maxWidth = m.top.width
end sub

sub onHeightChanged()
m.backdrop.height = m.top.height
m.channelTitle.height = m.top.height
end sub

sub contentChanged()

itemData = m.top.content

if not isValid(itemData) then return

if isValid(itemData.title)
m.channelTitle.text = itemData.LookupCI("title")
end if
end sub
12 changes: 12 additions & 0 deletions components/liveTv/ChannelInfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<component name="ChannelInfo" extends="Group">
<children>
<Rectangle id="backdrop" />
<ScrollingLabel id="channelTitle" horizAlign="center" vertAlign="center" />
</children>
<interface>
<field id="content" type="node" onChange="contentChanged" />
<field id="width" type="integer" onChange="onWidthChanged" />
<field id="height" type="integer" onChange="onHeightChanged" />
</interface>
</component>
4 changes: 4 additions & 0 deletions components/liveTv/ProgramDetails.bs
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import "pkg:/source/enums/ColorPalette.bs"
import "pkg:/source/utils/config.bs"
import "pkg:/source/utils/misc.bs"

sub init()

backdrop = m.top.findNode("backdrop")
backdrop.color = ColorPalette.ELEMENTBACKGROUND

' Max "Overview" lines to show in Preview and Detail
m.maxPreviewLines = 5
m.maxDetailLines = 14
Expand Down
1 change: 1 addition & 0 deletions components/liveTv/ProgramDetails.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<component name="ProgramDetails" extends="JFGroup">
<children>
<Rectangle id="backdrop" height="1080" width="1920" />

<!-- Selected Item Details -->
<maskGroup id="backgroundMask" maskUri="pkg:/images/backgroundmask.png" translation="[1320, 150]" maskSize="[500,375]">
Expand Down
2 changes: 2 additions & 0 deletions components/liveTv/schedule.bs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ sub init()

m.scheduleGrid.focusBitmapBlendColor = ColorPalette.HIGHLIGHT
m.scheduleGrid.programTitleFocusedColor = ColorPalette.WHITE
m.scheduleGrid.timeLabelColor = ColorPalette.LIGHTGREY
m.scheduleGrid.timeLabelFont.size = 30

m.gridMoveAnimation = m.top.findNode("gridMoveAnimation")
m.gridMoveAnimationPosition = m.top.findNode("gridMoveAnimationPosition")
Expand Down
1 change: 1 addition & 0 deletions components/liveTv/schedule.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

<TimeGrid
id="scheduleGrid"
channelInfoComponentName="ChannelInfo"
translation="[0,600]"
automaticLoadingDataFeedback="false"
showLoadingDataFeedback="true"
Expand Down

0 comments on commit 8816cee

Please sign in to comment.