implement hide and hover titles in griditem
This commit is contained in:
parent
0bba939779
commit
48545f1f1a
|
@ -13,11 +13,11 @@ sub init()
|
|||
|
||||
m.itemText.translation = [0, m.itemPoster.height + 7]
|
||||
|
||||
m.alwaysShowTitles = get_user_setting("itemgrid.gridTitles") = "showalways"
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user