From 64dd9962c4c9f61eaeabc6d1f751a8e3daad76bc Mon Sep 17 00:00:00 2001 From: Neil Burrows Date: Thu, 18 Jun 2020 16:09:18 +0100 Subject: [PATCH] Rounded corners on Items in new ItemGrid --- components/ItemGrid2/GridItem.brs | 13 +++++++------ components/ItemGrid2/GridItem.xml | 6 ++++-- images/postermask.png | Bin 0 -> 3129 bytes 3 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 images/postermask.png diff --git a/components/ItemGrid2/GridItem.brs b/components/ItemGrid2/GridItem.brs index f5bfbac3..f9ecd081 100644 --- a/components/ItemGrid2/GridItem.brs +++ b/components/ItemGrid2/GridItem.brs @@ -1,6 +1,9 @@ sub init() + m.posterMask = m.top.findNode("posterMask") m.itemPoster = m.top.findNode("itemPoster") m.itemText = m.top.findNode("itemText") + + m.itemText.translation = [0, m.itemPoster.height + 7] end sub sub itemContentChanged() @@ -9,14 +12,12 @@ sub itemContentChanged() if itemData = invalid then return - itemPoster = m.top.findNode("itemPoster") - if itemData.type = "Movie" then - itemPoster.uri = itemData.PosterUrl + m.itemPoster.uri = itemData.PosterUrl m.itemText.text = itemData.Title return else if itemData.type = "Series" then - itemPoster.uri = itemData.PosterUrl + m.itemPoster.uri = itemData.PosterUrl m.itemText.text = itemData.Title return end if @@ -28,8 +29,8 @@ end sub ' 'Use FocusPercent to animate scaling of Poser Image sub focusChanging() - scaleFactor = 1 + (m.top.focusPercent * 0.17333) - m.itemPoster.scale = [scaleFactor, scaleFactor] + scaleFactor = 0.85 + (m.top.focusPercent * 0.15) + m.posterMask.scale = [scaleFactor, scaleFactor] end sub ' diff --git a/components/ItemGrid2/GridItem.xml b/components/ItemGrid2/GridItem.xml index 8fcf9fd9..fb9d803e 100644 --- a/components/ItemGrid2/GridItem.xml +++ b/components/ItemGrid2/GridItem.xml @@ -1,8 +1,10 @@ - - + + + + diff --git a/images/postermask.png b/images/postermask.png new file mode 100644 index 0000000000000000000000000000000000000000..1984f9a77db565afb446bde8e0480178519499ad GIT bin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