mirror of
https://github.com/jellyfin/jellyfin-roku.git
synced 2024-11-23 22:29:43 +00:00
Colorize background of items with no poster
This commit is contained in:
parent
ea245d2abc
commit
aad789c87c
@ -2,8 +2,13 @@ sub init()
|
||||
m.title = m.top.findNode("title")
|
||||
m.staticTitle = m.top.findNode("staticTitle")
|
||||
m.poster = m.top.findNode("poster")
|
||||
|
||||
m.backdrop = m.top.findNode("backdrop")
|
||||
m.backdrop.color = "#404040FF"
|
||||
|
||||
' Randmomise the background colors
|
||||
posterBackgrounds = [ "#5ccea9", "#d2b019", "#dd452b", "#338abb", "#6b689d" ]
|
||||
m.backdrop.color = posterBackgrounds[rnd(posterBackgrounds.count()) - 1]
|
||||
|
||||
updateSize()
|
||||
end sub
|
||||
|
||||
|
@ -16,6 +16,12 @@ sub itemContentChanged()
|
||||
m.itemText.maxWidth = imageWidth
|
||||
itemTextExtra.width = imageWidth
|
||||
|
||||
' Randmomise the background colors
|
||||
m.backdrop = m.top.findNode("backdrop")
|
||||
posterBackgrounds = [ "#5ccea9", "#d2b019", "#dd452b", "#338abb", "#6b689d" ]
|
||||
m.backdrop.color = posterBackgrounds[rnd(posterBackgrounds.count()) - 1]
|
||||
m.backdrop.width = imageWidth
|
||||
|
||||
' Whether to use WidePoster or Thumbnail in this row
|
||||
usePoster = m.top.GetParent().content.usePoster
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<component name="HomeItem" extends="Group">
|
||||
<children>
|
||||
<Rectangle id="backdrop" width="464" height="261" translation="[8,5]" />
|
||||
<Poster id="itemPoster" width="464" height="261" translation="[8,5]" />
|
||||
<ScrollingLabel id="itemText" horizAlign="center" vertAlign="center" font="font:SmallBoldSystemFont" height="64" maxWidth="456" translation="[8,267]" repeatCount="0" />
|
||||
<Label id="itemTextExtra" horizAlign="left" vertAlign="center" font="font:SmallBoldSystemFont" height="32" width="456" translation="[8,300]" visible="false" color="#777777FF" />
|
||||
|
Loading…
Reference in New Issue
Block a user