Fix for channel view layout (#167)
* Fix for channel view layout * tweak
This commit is contained in:
1 parent
0aad02f5e6
commit
4efbdda167
3 files changed
+28
-9
No files matched your search
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Layout in channel view so that the upload time and view count of videos is visible
|
||||||
|
|
||||||
## [0.13.1] - 2023-10-08
|
## [0.13.1] - 2023-10-08
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ import "pkg:/source/utils/Types.bs"
|
|||||||
function Init()
|
function Init()
|
||||||
m.container = m.top.findNode("container")
|
m.container = m.top.findNode("container")
|
||||||
m.scrollAnimation = m.top.findNode("scrollAnimation")
|
m.scrollAnimation = m.top.findNode("scrollAnimation")
|
||||||
m.scrollAnimationInterpolator = m.scrollAnimation.findNode("scrollAnimationInterpolator")
|
m.containerTranslation = m.scrollAnimation.findNode("containerTranslation")
|
||||||
|
m.bannerTranslation = m.scrollAnimation.findNode("bannerTranslation")
|
||||||
|
|
||||||
m.banner = m.top.findNode("banner")
|
m.banner = m.top.findNode("banner")
|
||||||
m.thumbnail = m.top.findNode("thumbnail")
|
m.thumbnail = m.top.findNode("thumbnail")
|
||||||
@@ -95,16 +96,24 @@ function OnBannerLoadStatus() as void
|
|||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
aspect = m.banner.bitmapWidth / m.banner.bitmapHeight
|
bannerAspect = m.banner.bitmapWidth / m.banner.bitmapHeight
|
||||||
m.banner.height = m.banner.width / aspect
|
bannerHeight = m.banner.width / bannerAspect
|
||||||
m.banner.translation = [0, -m.banner.height]
|
m.banner.height = bannerHeight
|
||||||
|
m.banner.translation = [0, -bannerHeight]
|
||||||
m.banner.visible = true
|
m.banner.visible = true
|
||||||
|
|
||||||
|
startPos = [0, -bannerHeight]
|
||||||
|
endPos = [0, 0]
|
||||||
|
midPos = [0, (startPos[1] + endPos[1]) / 2]
|
||||||
|
|
||||||
|
m.bannerTranslation.keyValue = [startPos, midPos, endPos]
|
||||||
|
|
||||||
startPos = [0, 0]
|
startPos = [0, 0]
|
||||||
endPos = [0, m.banner.height]
|
endPos = [0, bannerHeight - m.thumbnail.height * 0.4]
|
||||||
midPos = [0, m.banner.height / 2]
|
midPos = [0, (startPos[1] + endPos[1]) / 2]
|
||||||
|
|
||||||
|
m.containerTranslation.keyValue = [startPos, midPos, endPos]
|
||||||
|
|
||||||
m.scrollAnimationInterpolator.keyValue = [startPos, midPos, endPos]
|
|
||||||
m.scrollAnimation.control = "start"
|
m.scrollAnimation.control = "start"
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
|||||||
@@ -11,12 +11,12 @@
|
|||||||
color="0x242424">
|
color="0x242424">
|
||||||
</Rectangle>
|
</Rectangle>
|
||||||
|
|
||||||
<Group id="container">
|
|
||||||
<Poster
|
<Poster
|
||||||
id="banner"
|
id="banner"
|
||||||
width="1280"
|
width="1280"
|
||||||
visible="false" />
|
visible="false" />
|
||||||
|
|
||||||
|
<Group id="container">
|
||||||
<Poster
|
<Poster
|
||||||
translation="[115,20]"
|
translation="[115,20]"
|
||||||
width="104"
|
width="104"
|
||||||
@@ -58,7 +58,11 @@
|
|||||||
delay="0.3"
|
delay="0.3"
|
||||||
duration="0.6">
|
duration="0.6">
|
||||||
<Vector2DFieldInterpolator
|
<Vector2DFieldInterpolator
|
||||||
id="scrollAnimationInterpolator"
|
id="bannerTranslation"
|
||||||
|
key="[ 0.0, 0.5, 1.0 ]"
|
||||||
|
fieldToInterp="banner.translation" />
|
||||||
|
<Vector2DFieldInterpolator
|
||||||
|
id="containerTranslation"
|
||||||
key="[ 0.0, 0.5, 1.0 ]"
|
key="[ 0.0, 0.5, 1.0 ]"
|
||||||
fieldToInterp="container.translation" />
|
fieldToInterp="container.translation" />
|
||||||
</Animation>
|
</Animation>
|
||||||
|
|||||||
Reference in new issue
Block a user