Hide rating layoutgroup if no data

This commit is contained in:
candry7731 2022-11-10 22:35:34 -06:00
parent 2e30c2e4e1
commit f0960e8e9c
2 changed files with 5 additions and 3 deletions

View File

@ -47,7 +47,9 @@ sub itemContentChanged()
m.top.findNode("star").visible = true
m.top.findNode("communityRating").text = str(int(itemData.communityRating * 10) / 10)
else
m.top.findNode("star").visible = false
m.rating = m.top.findnode("rating")
m.rating.removeChild(m.top.findNode("star"))
m.rating.removeChild(m.top.findNode("communityRating"))
end if
videoIdx = invalid

View File

@ -8,9 +8,9 @@
<!-- Using poster of 1 length to get spacing. Not successful with adding translation to title -->
<Poster id="null" height="1" />
<ScrollingLabel id="title" font="font:MediumBoldSystemFont" maxWidth="950" />
<LayoutGroup layoutDirection="horiz" itemSpacings="[20]">
<LayoutGroup layoutDirection="horiz" itemSpacings="[10]">
<Label id="runtime" font="font:SmallestSystemFont" />
<LayoutGroup layoutDirection="horiz" itemSpacings="[-5]">
<LayoutGroup id="rating" layoutDirection="horiz" itemSpacings="[-5]">
<Poster id="star" uri="pkg:/images/sharp_star_white_18dp.png" height="26" width="26" blendColor="#cb272a" />
<Label id="communityRating" font="font:SmallestSystemFont" />
</LayoutGroup>