Merge pull request #964 from sevenrats/settings_again

improve settings menu, implement title hover and hide in griditem and musicartistgriditem
This commit is contained in:
1hitsong 2023-02-02 09:07:29 -05:00 committed by GitHub
commit ca6e08b4ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 199 additions and 156 deletions

View File

@ -13,11 +13,11 @@ sub init()
m.itemText.translation = [0, m.itemPoster.height + 7]
m.alwaysShowTitles = get_user_setting("itemgrid.alwaysShowTitles") = "true"
m.itemText.visible = m.alwaysShowTitles
m.gridTitles = get_user_setting("itemgrid.gridTitles")
m.itemText.visible = m.gridTitles = "showalways"
' Add some padding space when Item Titles are always showing
if m.alwaysShowTitles then m.itemText.maxWidth = 250
if m.itemText.visible then m.itemText.maxWidth = 250
'Parent is MarkupGrid and it's parent is the ItemGrid
m.topParent = m.top.GetParent().GetParent()
@ -131,16 +131,17 @@ end sub
'Display or hide title Visibility on focus change
sub focusChanged()
if m.top.itemHasFocus = true
m.itemText.visible = true
m.itemText.repeatCount = -1
m.posterMask.scale = [1, 1]
else
m.itemText.visible = m.alwaysShowTitles
m.itemText.repeatCount = 0
if m.topParent.alphaActive = true
m.posterMask.scale = [0.85, 0.85]
end if
end if
if m.gridTitles = "showonhover"
m.itemText.visible = m.top.itemHasFocus
end if
end sub
'Hide backdrop and text when poster loaded

View File

@ -196,7 +196,7 @@ sub loadInitialItems()
m.itemGrid.numRows = "3"
m.selectedMovieOverview.visible = false
m.infoGroup.visible = false
m.top.showItemTitles = get_user_setting("itemgrid.movieGridTitles")
m.top.showItemTitles = get_user_setting("itemgrid.gridTitles")
if LCase(m.top.showItemTitles) = "hidealways"
m.itemGrid.itemSize = "[230, 315]"
m.itemGrid.rowHeights = "[315]"

View File

@ -1,5 +1,6 @@
sub init()
m.itemPoster = m.top.findNode("itemPoster")
m.postTextBackground = m.top.findNode("postTextBackground")
m.posterText = m.top.findNode("posterText")
m.posterText.font.size = 30
m.backdrop = m.top.findNode("backdrop")
@ -14,11 +15,25 @@ sub init()
m.itemPoster.loadDisplayMode = m.topParent.imageDisplayMode
end if
m.gridTitles = get_user_setting("itemgrid.gridTitles")
m.posterText.visible = false
m.postTextBackground.visible = false
end sub
sub itemContentChanged()
m.backdrop.blendColor = "#101010"
m.posterText.visible = false
m.postTextBackground.visible = false
if isValid(m.topParent.showItemTitles)
if LCase(m.topParent.showItemTitles) = "showalways"
m.posterText.visible = true
m.postTextBackground.visible = true
end if
end if
itemData = m.top.itemContent
if not isValid(itemData) then return
@ -38,6 +53,23 @@ sub itemContentChanged()
if m.itemPoster.loadStatus <> "ready"
m.backdrop.visible = true
end if
if m.top.itemHasFocus then focusChanged()
end sub
'Display or hide title Visibility on focus change
sub focusChanged()
if m.top.itemHasFocus = true
m.posterText.repeatCount = -1
else
m.posterText.repeatCount = 0
end if
if isValid(m.topParent.showItemTitles)
if LCase(m.topParent.showItemTitles) = "showonhover"
m.posterText.visible = m.top.itemHasFocus
m.postTextBackground.visible = m.posterText.visible
end if
end if
end sub
'Hide backdrop and text when poster loaded

View File

@ -135,6 +135,8 @@ sub loadInitialItems()
m.sortAscending = false
end if
m.top.showItemTitles = get_user_setting("itemgrid.gridTitles")
if LCase(m.top.parentItem.json.type) = "musicgenre"
m.itemGrid.translation = "[96, 60]"
m.loadItemsTask.itemType = "MusicAlbum"
@ -143,6 +145,7 @@ sub loadInitialItems()
m.loadItemsTask.itemId = m.top.parentItem.parentFolder
else if LCase(m.view) = "artistspresentation" or LCase(m.options.view) = "artistspresentation"
m.loadItemsTask.genreIds = ""
m.top.showItemTitles = "hidealways"
else if LCase(m.view) = "artistsgrid" or LCase(m.options.view) = "artistsgrid"
m.loadItemsTask.genreIds = ""
else

View File

@ -33,13 +33,13 @@
</children>
<interface>
<field id="HomeLibraryItem" type="string"/>
<field id="View" type="string"/>
<field id="parentItem" type="node" onChange="loadInitialItems" />
<field id="selectedItem" type="node" alwaysNotify="true" />
<field id="quickPlayNode" type="node" alwaysNotify="true" />
<field id="imageDisplayMode" type="string" value="scaleToZoom" />
<field id="AlphaSelected" type="string" alias="AlphaMenu.itemAlphaSelected" alwaysNotify="true" onChange="onItemAlphaSelected" />
<field id="alphaActive" type="boolean" value="false" />
<field id="showItemTitles" type="string" value="showonhover" />
<field id="jumpToItem" type="integer" value="" />
</interface>
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />

View File

@ -557,16 +557,6 @@
<source>Media Grid options.</source>
<translation>Media Grid options.</translation>
</message>
<message>
<source>Item Titles</source>
<translation>Item Titles</translation>
<extracomment>UI -&gt; Media Grid -&gt; Item Title in user setting screen.</extracomment>
</message>
<message>
<source>Always show the titles below the poster images. (If disabled, the title will be shown under the highlighted item only).</source>
<translation>Always show the titles below the poster images. (If disabled, the title will be shown under the highlighted item only).</translation>
<extracomment>Description for option in Setting Screen</extracomment>
</message>
<message>
<source>Item Count</source>
<translation>Item Count</translation>
@ -660,15 +650,6 @@
<translation>Use the replay button to slowly animate to the first item in the folder. (If disabled, the folder will reset to the first item immediately).</translation>
<extracomment>Description for option in Setting Screen</extracomment>
</message>
<message>
<source>Details Page</source>
<translation>Details Page</translation>
</message>
<message>
<source>Options for Details pages.</source>
<translation>Options for Details pages.</translation>
<extracomment>Description for Details page user settings.</extracomment>
</message>
<message>
<source>Hide Taglines</source>
<translation>Hide Taglines</translation>
@ -712,8 +693,8 @@
<extracomment>Description for Screensaver user settings.</extracomment>
</message>
<message>
<source>Use Splashscreen as Screensaver Background</source>
<translation>Use Splashscreen as Screensaver Background</translation>
<source>Use Splashscreen as Screensaver</source>
<translation>Use Splashscreen as Screensaver</translation>
<extracomment>Option Title in user setting screen</extracomment>
</message>
<message>
@ -795,15 +776,6 @@
<source>Settings relating to how the application looks.</source>
<translation>Settings relating to how the application looks.</translation>
</message>
<message>
<source>Home Page</source>
<translation>Home Page</translation>
</message>
<message>
<source>Options for Home Page.</source>
<translation>Options for Home Page.</translation>
<extracomment>Description for Home Page user settings.</extracomment>
</message>
<message>
<source>Max Days Next Up</source>
<translation>Max Days Next Up</translation>
@ -992,9 +964,9 @@
<translation>Movies (Grid)</translation>
</message>
<message>
<source>Movie Library Grid Titles</source>
<translation>Movie Library Grid Titles</translation>
<extracomment>Settings Menu - Title for option</extracomment>
<source>Item Titles</source>
<translation>Item Titles</translation>
<extracomment>Title of a setting - when should we show the title text of a grid item</extracomment>
</message>
<message>
<source>Select when to show titles.</source>
@ -1049,5 +1021,47 @@
<source>If enabled, the star and community rating for episodes of a TV show will be removed. This is to prevent spoilers of an upcoming good/bad episode.</source>
<translation>If enabled, the star and community rating for episodes of a TV show will be removed. This is to prevent spoilers of an upcoming good/bad episode.</translation>
</message>
<message>
<source>Libraries</source>
<translation>Libraries</translation>
</message>
<message>
<source>Settings relating to the appearance of Library pages</source>
<translation>Settings relating to the appearance of Library pages</translation>
</message>
<message>
<source>General</source>
<translation>General</translation>
</message>
<message>
<source>Settings relating to the appearance of the Home screen and the program in general.</source>
<translation>Settings relating to the appearance of the Home screen and the program in general.</translation>
</message>
<message>
<source>Grid View Settings</source>
<translation>Grid View Settings</translation>
</message>
<message>
<source>Settings that apply when Grid views are enabled.</source>
<translation>Settings that apply when Grid views are enabled.</translation>
</message>
<message>
<source>Settings relating to the appearance of pages in TV Libraries.</source>
<translation>Settings relating to the appearance of pages in TV Libraries.</translation>
</message>
<message>
<source>Settings relating to the appearance of pages in Movie Libraries.</source>
<translation>Settings relating to the appearance of pages in Movie Libraries.</translation>
</message>
<message>
<source>Presentation</source>
<translation>Presentation</translation>
<extracomment>Title of an option - name of presentation view</extracomment>
</message>
<message>
<source>Grid</source>
<translation>Grid</translation>
<extracomment>Title of an option - name of grid view</extracomment>
</message>
</context>
</TS>

View File

@ -66,21 +66,21 @@
}
]
},
{
"title": "Show What's New Popup",
"description": "Show What's New popup when Jellyfin is updated to a new version.",
"settingName": "load.allowwhatsnew",
"type": "bool",
"default": "true"
},
{
"title": "User Interface",
"description": "Settings relating to how the application looks.",
"children": [
{
"title": "Home Page",
"description": "Options for Home page.",
"title": "General",
"description": "Settings relating to the appearance of the Home screen and the program in general.",
"children": [
{
"title": "Hide Clock",
"description": "Hides all clocks in Jellyfin. Jellyfin will need to be closed and reopened for change to take effect.",
"settingName": "ui.design.hideclock",
"type": "bool",
"default": "false"
},
{
"title": "Max Days Next Up",
"description": "Set the maximum amount of days a show should stay in the 'Next Up' list without watching it.",
@ -88,61 +88,22 @@
"type": "integer",
"default": "365"
},
{
"title": "Show What's New Popup",
"description": "Show What's New popup when Jellyfin is updated to a new version.",
"settingName": "load.allowwhatsnew",
"type": "bool",
"default": "true"
},
{
"title": "Use Splashscreen as Home Background",
"description": "Use generated splashscreen image as Jellyfin's home background. Jellyfin will need to be closed and reopened for change to take effect.",
"settingName": "ui.home.splashBackground",
"type": "bool",
"default": "false"
}
]
},
{
"title": "Details Page",
"description": "Options for Details pages.",
"children": [
{
"title": "Hide Taglines",
"description": "Hides tagline text on details pages.",
"settingName": "ui.details.hidetagline",
"type": "bool",
"default": "false"
}
]
},
{
"title": "TV Shows",
"description": "Options for TV Shows.",
"children": [
{
"title": "Blur Unwatched Episodes",
"description": "If enabled, images of unwatched episodes will be blurred.",
"settingName": "ui.tvshows.blurunwatched",
"type": "bool",
"default": "false"
},
{
"title": "Skip Details for Single Seasons",
"description": "If enabled, selecting a TV series with only one season will go straight to the episode list rather than the show details and season list.",
"settingName": "ui.tvshows.goStraightToEpisodeListing",
"type": "bool",
"default": "false"
},
{
"title":"Disable Community Rating for Episodes",
"description": "If enabled, the star and community rating for episodes of a TV show will be removed. This is to prevent spoilers of an upcoming good/bad episode.",
"settingName": "ui.tvshows.disableCommunityRating",
"type":"bool",
"default":"false"
}
]
},
{
"title": "Screensaver",
"description": "Options for Jellyfin's screensaver.",
"children": [
{
"title": "Use Splashscreen as Screensaver Background",
"title": "Use Splashscreen as Screensaver",
"description": "Use generated splashscreen image as Jellyfin's screensaver background. Jellyfin will need to be closed and reopened for change to take effect.",
"settingName": "ui.screensaver.splashBackground",
"type": "bool",
@ -151,80 +112,112 @@
]
},
{
"title": "Design Elements",
"description": "Options that alter the design of Jellyfin.",
"title": "Libraries",
"description": "Settings relating to the appearance of Library pages.",
"children": [
{
"title": "Hide Clock",
"description": "Hides all clocks in Jellyfin. Jellyfin will need to be closed and reopened for change to take effect.",
"settingName": "ui.design.hideclock",
"type": "bool",
"default": "false"
}
]
},
{
"title": "Media Grid",
"description": "Media Grid options.",
"children": [
{
"title": "Movie Library Default View",
"description": "Default view for Movie Libraries.",
"settingName": "itemgrid.movieDefaultView",
"type": "radio",
"default": "movies",
"options": [
"title": "General",
"description": "Settings relating to the appearance of pages in all Libraries.",
"children": [
{
"title": "Movies (Presentation)",
"id": "Movies"
"title": "Grid View Settings",
"description": "Settings that apply when Grid views are enabled.",
"children": [
{
"title": "Item Count",
"description": "Show item count in the library and index of selected item.",
"settingName": "itemgrid.showItemCount",
"type": "bool",
"default": "false"
},
{
"title": "Item Titles",
"description": "Select when to show titles.",
"settingName": "itemgrid.gridTitles",
"type": "radio",
"default": "showonhover",
"options": [
{
"title": "Show On Hover",
"id": "showonhover"
},
{
"title": "Always Show",
"id": "showalways"
},
{
"title": "Always Hide",
"id": "hidealways"
}
]
}
]
},
{
"title": "Movies (Grid)",
"id": "MoviesGrid"
"title": "Hide Taglines",
"description": "Hides tagline text on details pages.",
"settingName": "ui.details.hidetagline",
"type": "bool",
"default": "false"
},
{
"title": "Return to Top",
"description": "Use the replay button to slowly animate to the first item in the folder. (If disabled, the folder will reset to the first item immediately).",
"settingName": "itemgrid.reset",
"type": "bool",
"default": "true"
}
]
},
{
"title": "Movie Library Grid Titles",
"description": "Select when to show titles.",
"settingName": "itemgrid.movieGridTitles",
"type": "radio",
"default": "showonhover",
"options": [
"title": "Movies",
"description": "Settings relating to the appearance of pages in Movie Libraries.",
"children": [
{
"title": "Show On Hover",
"id": "showonhover"
},
{
"title": "Always Show",
"id": "showalways"
},
{
"title": "Always Hide",
"id": "hidealways"
"title": "Default View",
"description": "Default view for Movie Libraries.",
"settingName": "itemgrid.movieDefaultView",
"type": "radio",
"default": "movies",
"options": [
{
"title": "Movies (Presentation)",
"id": "Movies"
},
{
"title": "Movies (Grid)",
"id": "MoviesGrid"
}
]
}
]
},
{
"title": "Item Count",
"description": "Show item count in the library and index of selected item.",
"settingName": "itemgrid.showItemCount",
"type": "bool",
"default": "false"
},
{
"title": "Item Titles",
"description": "Always show the titles below the poster images. (If disabled, the title will be shown under the highlighted item only).",
"settingName": "itemgrid.alwaysShowTitles",
"type": "bool",
"default": "false"
},
{
"title": "Return to Top",
"description": "Use the replay button to slowly animate to the first item in the folder. (If disabled, the folder will reset to the first item immediately).",
"settingName": "itemgrid.reset",
"type": "bool",
"default": "true"
"title": "TV Shows",
"description": "Settings relating to the appearance of pages in TV Libraries.",
"children": [
{
"title": "Blur Unwatched Episodes",
"description": "If enabled, images of unwatched episodes will be blurred.",
"settingName": "ui.tvshows.blurunwatched",
"type": "bool",
"default": "false"
},
{
"title": "Skip Details for Single Seasons",
"description": "If enabled, selecting a TV series with only one season will go straight to the episode list rather than the show details and season list.",
"settingName": "ui.tvshows.goStraightToEpisodeListing",
"type": "bool",
"default": "false"
},
{
"title": "Disable Community Rating for Episodes",
"description": "If enabled, the star and community rating for episodes of a TV show will be removed. This is to prevent spoilers of an upcoming good/bad episode.",
"settingName": "ui.tvshows.disableCommunityRating",
"type": "bool",
"default": "false"
}
]
}
]
}