Skip to content

Commit 2d358ac

Browse files
hide runtime for tvshows, update settings style (#112)
* skip settings menu animation * hide runtime for non-movies on media bar * change settings style, update translation of elements
1 parent 329bf77 commit 2d358ac

4 files changed

Lines changed: 26 additions & 23 deletions

File tree

components/home/MediaBar.bs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ function processItem(item as object) as object
292292
if displayGenres.count() > 3
293293
displayGenres = [displayGenres[0], displayGenres[1], displayGenres[2]]
294294
end if
295-
processed.genresDisplay = displayGenres.join(" ")
295+
processed.genresDisplay = displayGenres.join(" ")
296296
end if
297297

298298
return processed
@@ -482,11 +482,14 @@ sub showMediaBarItem(index as integer)
482482
end if
483483
end if
484484

485-
if item.runtimeDisplay <> ""
485+
if item.itemType = "Movie" and item.runtimeDisplay <> ""
486486
m.runtimeLabel.text = item.runtimeDisplay
487+
m.separatorDot3.text = " • "
487488
hasRuntime = true
488489
else
489490
m.runtimeLabel.text = ""
491+
m.separatorDot3.text = ""
492+
hasRuntime = false
490493
end if
491494

492495
' Community rating with star
@@ -501,7 +504,7 @@ sub showMediaBarItem(index as integer)
501504

502505
' Show/hide separator dots based on what metadata exists
503506
m.separatorDot1.visible = (hasYear and hasRating)
504-
m.separatorDot2.visible = (hasRating and hasRuntime)
507+
m.separatorDot2.visible = (hasRating)
505508
m.separatorDot3.visible = (hasRuntime and hasStarRating)
506509

507510
pluginRatingsEnabled = moonfinPlugin.IsRatingsEnabled()

components/home/MediaBar.xml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,13 @@
5959
<LayoutGroup
6060
id="metadataRow"
6161
layoutDirection="horiz"
62-
itemSpacings="[18]"
6362
>
6463
<Label id="yearLabel" font="font:SmallestBoldSystemFont" color="0xFFFFFFFF" text="" />
6564
<Label
6665
id="separatorDot1"
67-
font="font:SmallSystemFont"
66+
font="font:SmallestSystemFont"
6867
color="0xFFFFFFFF"
69-
text=""
68+
text=""
7069
visible="false"
7170
/>
7271
<Group id="ratingGroup">
@@ -75,26 +74,26 @@
7574
</Group>
7675
<Label
7776
id="separatorDot2"
78-
font="font:SmallSystemFont"
77+
font="font:SmallestSystemFont"
7978
color="0xFFFFFFFF"
80-
text=""
79+
text=""
8180
visible="false"
8281
/>
8382
<Label id="runtimeLabel" font="font:SmallestBoldSystemFont" color="0xFFFFFFFF" text="" />
8483
<Label
8584
id="separatorDot3"
86-
font="font:SmallSystemFont"
85+
font="font:SmallestSystemFont"
8786
color="0xFFFFFFFF"
88-
text=""
87+
text=" "
8988
visible="false"
9089
/>
91-
<Label id="starLabel" font="font:SmallestBoldSystemFont" color="0xFFD700FF" text="" visible="false" />
90+
<Label id="starLabel" font="font:SmallestBoldSystemFont" color="0xFFD700FF" text=" " visible="false" />
9291
<Label id="communityRatingLabel" font="font:SmallestBoldSystemFont" color="0xFFFFFFFF" text="" />
9392
<Label
9493
id="separatorDot4"
95-
font="font:SmallSystemFont"
94+
font="font:SmallestSystemFont"
9695
color="0xFFFFFFFF"
97-
text=""
96+
text=""
9897
visible="false"
9998
/>
10099
<Label id="genresLabel" font="font:SmallestBoldSystemFont" color="0xFFFFFFFF" text="" />

components/settings/SettingsMenuItem.bs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ sub focusChanged()
5151
stopMarquee(m.settingTitle)
5252
stopMarquee(m.settingCurrentValue)
5353
stopMarquee(m.settingDescription)
54-
m.buttonBackground.blendColor = ColorPalette.ELEMENTBACKGROUND
54+
m.buttonBackground.blendColor = "#181818FF"
5555
m.focusOutline.visible = false
5656
m.settingTitle.color = ColorPalette.WHITE
5757
m.settingCurrentValue.color = focusColor

components/settings/settings.xml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,26 @@
77
<children>
88

99
<Rectangle id="panelBackdrop" translation="[0, 0]" width="1920" height="1080" color="#000000" opacity="0.70" />
10-
<Rectangle id="panelBackground" translation="[1120, 0]" width="800" height="1080" color="#101826" />
10+
<Rectangle id="panelBackground" translation="[1120, 0]" width="800" height="1080" color="#101010" />
1111

12-
<Text id="path" translation="[1140, 160]" font="font:SmallestBoldSystemFont" />
12+
<ScrollingText id="path" translation="[1146, 22]" font="font:SmallBoldSystemFont" maxWidth="747" />
1313
<MultiStyleLabel id="version" translation="[1140, 1020]" />
1414

1515
<MarkupList
16-
translation="[1146, 220]"
16+
translation="[1146, 80]"
1717
id="settingsMenu"
1818
itemComponentName="SettingsMenuItem"
1919
itemSize="[747, 120]"
2020
itemSpacing="[0,10]"
21-
numRows="6"
22-
vertFocusAnimationStyle="floatingFocus" />
21+
numRows="7"
22+
vertFocusAnimationStyle="floatingFocus"
23+
skipFocusAnimations="true" />
2324

24-
<Text id="settingDesc" translation="[180, 180]" width="880" wrap="true" horizAlign="left" visible="false" />
25+
<Text id="settingDesc" translation="[110, 180]" width="880" wrap="true" horizAlign="left" visible="false" />
2526

26-
<RadioButtonList id="radioSetting" numRows="6" vertFocusAnimationStyle="floatingFocus" translation="[280, 280]" visible="false" />
27+
<RadioButtonList id="radioSetting" numRows="6" vertFocusAnimationStyle="floatingFocus" translation="[290, 350]" visible="false" />
2728

28-
<RadioButtonList id="boolSetting" vertFocusAnimationStyle="floatingFocus" translation="[560, 400]" visible="false">
29+
<RadioButtonList id="boolSetting" vertFocusAnimationStyle="floatingFocus" translation="[290, 400]" visible="false">
2930
<ContentNode role="content">
3031
<ContentNode title="Disabled" />
3132
<ContentNode title="Enabled" />
@@ -34,7 +35,7 @@
3435

3536
<ColorGrid
3637
id="colorgrid"
37-
translation="[60, 240]"
38+
translation="[60, 400]"
3839
itemComponentName="ColorOption"
3940
numColumns="15"
4041
numRows="9"

0 commit comments

Comments
 (0)