王士厅

fix: 鸿蒙设备视频沉浸式视频色值与按钮接近的时候,整个顶部图标及tab按钮完全看不见

... ... @@ -232,15 +232,15 @@ export struct VideoChannelPage {
.backgroundColor(Color.Transparent)
}
//顶部渐变遮罩
// .linearGradient({
// colors: [
// ['rgba(0, 0, 0, 0.0)', 0.0], ['rgba(0, 0, 0, 0.3)', 1.0]
// ]
// })
.zIndex(20)
.height($r('app.float.top_tab_bar_height_common'))
.margin({
.height(44 + px2vp(this.topSafeHeight))
//顶部渐变遮罩
.linearGradient({
direction: GradientDirection.Top, // 渐变方向
colors: this.currentTopNavSelectedIndex === 0 ? [['rgba(18, 18, 18, 0)', 0],
['rgba(18, 18, 18, 0.5)', 1.0]] : []// 数组末尾元素占比小于1时满足重复着色效果
})
.padding({
top: px2vp(this.topSafeHeight)
})
.visibility(this.displayDirection === DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
... ...