Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix home image size bug. Update all home view sections - including those previously hidden #1530

Merged
merged 21 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
"docs/api/**": true
},
"brightscriptcomment.addExtraAtStartAndEnd": false
}
}
11 changes: 9 additions & 2 deletions components/home/Home.bs
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,25 @@ sub init()
m.top.optionsAvailable = true
m.postTask = createObject("roSGNode", "PostTask")

m.homeRows = m.top.findNode("homeRows")

m.fadeInFocusBitmap = m.top.findNode("fadeInFocusBitmap")

if m.global.session.user.settings["ui.home.splashBackground"] = true
m.backdrop = m.top.findNode("backdrop")
m.backdrop.uri = buildURL("/Branding/Splashscreen?format=jpg&foregroundLayer=0.15&fillWidth=1280&width=1280&fillHeight=720&height=720&tag=splash")
end if
end sub

sub refresh()
m.top.findNode("homeRows").callFunc("updateHomeRows")
m.homeRows.focusBitmapBlendColor = "0xFFFFFFFF"
m.homeRows.callFunc("updateHomeRows")
end sub

sub loadLibraries()
m.top.findNode("homeRows").callFunc("loadLibraries")
m.homeRows.focusBitmapBlendColor = "0xFFFFFF00"
m.homeRows.callFunc("loadLibraries")
m.fadeInFocusBitmap.control = "start"
end sub

' JFScreen hook that gets ran as needed.
Expand Down
6 changes: 5 additions & 1 deletion components/home/Home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
<component name="Home" extends="JFScreen">
<children>
<Poster id="backdrop" loadDisplayMode="scaleToZoom" width="1920" height="1200" />
<HomeRows id="homeRows" />
<HomeRows id="homeRows" focusBitmapBlendColor="0xFFFFFF00" />
<OptionsSlider id="options" />

<Animation id="fadeInFocusBitmap" delay="1" duration=".2" repeat="false" easeFunction="inQuad">
<ColorFieldInterpolator id="fadeInFocusBitmapInterpolator" key="[0.0, 1.0]" keyValue="[0xFFFFFF00, 0xFFFFFFFF]" fieldToInterp="homeRows.focusBitmapBlendColor" />
</Animation>
</children>
<interface>
<field id="selectedItem" alias="homeRows.selectedItem" />
Expand Down
5 changes: 5 additions & 0 deletions components/home/HomeItem.bs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ end sub


sub itemContentChanged()
m.unplayedCount.visible = false
itemData = m.top.itemContent
if itemData = invalid then return

Expand Down Expand Up @@ -65,6 +66,10 @@ sub itemContentChanged()

' Format the Data based on the type of Home Data
if itemData.type = "CollectionFolder" or itemData.type = "UserView" or itemData.type = "Channel"
m.itemText.font.size = 35
m.itemText.height = 64
m.itemText.horizAlign = "center"
m.itemText.vertAlign = "bottom"
m.itemText.text = itemData.name
m.itemPoster.uri = itemData.widePosterURL
return
Expand Down
1 change: 1 addition & 0 deletions components/home/HomeRow.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<component name="HomeRow" extends="ContentNode">
<interface>
<field id="imageWidth" type="integer" value="464" />
<field id="cursorSize" type="array" value="[464, 331]" />
<field id="usePoster" type="bool" value="false" />
</interface>
</component>
Loading