Skip to content

Commit

Permalink
Merge pull request #1956 from cewert/fix-griditemsmall-crash
Browse files Browse the repository at this point in the history
  • Loading branch information
cewert authored Oct 2, 2024
2 parents 5e98ce2 + 6f708c6 commit 5f1021e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/ItemGrid/GridItemSmall.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "pkg:/source/utils/config.bs"
sub init()
m.itemPoster = m.top.findNode("itemPoster")
m.posterText = m.top.findNode("posterText")
m.title = m.top.findNode("title")
initTitle()
m.posterText.font.size = 30
m.title.font.size = 25
m.backdrop = m.top.findNode("backdrop")
Expand All @@ -23,6 +23,10 @@ sub init()
end if
end sub

sub initTitle()
m.title = m.top.findNode("title")
end sub

sub itemContentChanged()
m.backdrop.blendColor = "#101010"

Expand Down Expand Up @@ -54,6 +58,8 @@ sub itemContentChanged()
end sub

sub focusChanged()
if not isValid(m.title) then initTitle()

if m.top.itemHasFocus = true
m.title.repeatCount = -1
else
Expand Down

0 comments on commit 5f1021e

Please sign in to comment.