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

Expand home rows to take up full width of the screen #1891

Merged
merged 8 commits into from
Nov 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
32 changes: 22 additions & 10 deletions components/home/HomeRows.bs
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,30 @@ sub loadLibraries()
end sub

sub updateSize()
m.top.translation = [111, 180]
itemHeight = 330

'Set width of Rows to cut off at edge of Safe Zone
m.top.itemSize = [1703, itemHeight]
uiRowLayout = m.global.session.user.settings["ui.row.layout"]

if isValid(uiRowLayout)
if uiRowLayout = "fullwidth"
m.top.translation = [0, 180]
' rows take up full width of the screen
m.top.itemSize = [1920, 330]
' align with edge of "action" safe zone
m.top.focusXOffset = [96]
m.top.rowLabelOffset = [96, 20]
else
' original layout
m.top.translation = [111, 180]
m.top.itemSize = [1703, 330]
' reset to defaults
m.top.focusXOffset = []
m.top.rowLabelOffset = [0, 20]
end if
end if

' spacing between rows
m.top.itemSpacing = [0, 105]

' spacing between items in a row
m.top.rowItemSpacing = [20, 0]

' Default size to wide poster, the most used size
m.top.rowItemSize = homeRowItemSizes.WIDE_POSTER
m.top.rowItemSpacing = [21, 0]

m.top.visible = true
end sub
Expand Down Expand Up @@ -455,6 +465,8 @@ end sub
sub updateHomeRows()
' Hide the row counter to prevent flicker. We'll show it once loading timer fires
m.top.showRowCounter = [false]
m.top.visible = false
updateSize()
processUserSections()
end sub

Expand Down
20 changes: 20 additions & 0 deletions locale/en_US/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1321,6 +1321,26 @@
<translation>Use Show Image</translation>
<extracomment>User Setting - Setting option title</extracomment>
</message>
<message>
<source>Row Layout</source>
<translation>Row Layout</translation>
<extracomment>User Setting - Setting title</extracomment>
</message>
<message>
<source>Choose how rows are displayed on the home screen.</source>
<translation>Choose how rows are displayed on the home screen.</translation>
<extracomment>User Setting - Setting description</extracomment>
</message>
<message>
<source>Original</source>
<translation>Original</translation>
<extracomment>User Setting - Setting option title</extracomment>
</message>
<message>
<source>Full Width</source>
<translation>Full Width</translation>
<extracomment>User Setting - Setting option title</extracomment>
</message>
<message>
<source>Episode Next Up Behavior</source>
<translation>Episode Next Up Behavior</translation>
Expand Down
17 changes: 17 additions & 0 deletions settings/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,23 @@
"type": "bool",
"default": "false"
},
{
"title": "Row Layout",
"description": "Choose how rows are displayed on the home screen.",
"settingName": "ui.row.layout",
"type": "radio",
"default": "fullwidth",
"options": [
{
"title": "Original",
"id": "original"
},
{
"title": "Full Width",
"id": "fullwidth"
}
]
},
{
"title": "Show What's New Popup",
"description": "Show What's New popup when Jellyfin is updated to a new version.",
Expand Down
Loading