From dbcc1ea45ecf34521aaa7b6d772a06a9deb4cda5 Mon Sep 17 00:00:00 2001 From: 1hitsong <3330318+1hitsong@users.noreply.github.com> Date: Mon, 19 Sep 2022 19:34:36 -0400 Subject: [PATCH] Hide overhang when not on 1st section --- components/JFOverhang.brs | 16 ++++++++++++ components/JFOverhang.xml | 43 +++++++++++++++------------------ components/music/ArtistView.brs | 14 +++++++++++ 3 files changed, 49 insertions(+), 24 deletions(-) diff --git a/components/JFOverhang.brs b/components/JFOverhang.brs index cf41f342..a7615895 100644 --- a/components/JFOverhang.brs +++ b/components/JFOverhang.brs @@ -18,6 +18,9 @@ sub init() m.overlayRightGroup = m.top.findNode("overlayRightGroup") m.overlayTimeGroup = m.top.findNode("overlayTimeGroup") + m.slideDownAnimation = m.top.findNode("slideDown") + m.slideUpAnimation = m.top.findNode("slideUp") + if not m.hideClock ' get system preference clock format (12/24hr) di = CreateObject("roDeviceInfo") @@ -40,6 +43,19 @@ sub init() setClockVisibility() end sub +sub onVisibleChange() + if m.top.disableMoveAnimation + m.top.translation = [0, 0] + return + end if + if m.top.isVisible + m.slideDownAnimation.control = "start" + return + end if + + m.slideUpAnimation.control = "start" +end sub + sub updateTitle() leftSeperator = m.top.findNode("overlayLeftSeperator") if m.top.title <> "" diff --git a/components/JFOverhang.xml b/components/JFOverhang.xml index 954d4c82..139d61a5 100644 --- a/components/JFOverhang.xml +++ b/components/JFOverhang.xml @@ -1,27 +1,15 @@ - + +