王士厅

fix: 音频悬浮窗关闭按钮比播放按钮尺寸偏大

... ... @@ -35,6 +35,7 @@ struct Index {
@State @Watch("moveWindow") windowPosition: Position = { x: vp2px(12), y: vp2px(576) };
private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.All });
private subWindow:window.Window | null = null
@State start: boolean = true
async aboutToAppear() {
this.subWindow = window.findWindow("subWindow")
... ... @@ -108,12 +109,13 @@ struct Index {
Stack({ alignContent: Alignment.End }) {
Column() { //标题 时间 进度条
Marquee({
start: true,
start: this.start,
step: 5,
loop: Number.POSITIVE_INFINITY,
fromStart: true,
src: this.audioTitle
})
.marqueeUpdateStrategy(MarqueeUpdateStrategy.DEFAULT)
.width("60%")
.height(20)
.fontColor('#222222')
... ... @@ -124,9 +126,10 @@ struct Index {
// .onStart(() => {
// console.info('Marquee animation complete onStart')
// })
// .onBounce(() => {
// console.info('Marquee animation complete onBounce')
// })
.onBounce(() => {
console.info('Marquee animation complete onBounce')
this.start = false
})
// .onFinish(() => {
// console.info('Marquee animation complete onFinish')
// })
... ... @@ -186,8 +189,8 @@ struct Index {
}))
Image($r("app.media.icon_audio_close"))
.objectFit(ImageFit.Contain)
.width(32)
.height(32)
.width(24)
.height(24)
.gesture(
TapGesture()
.onAction((event: GestureEvent) => {
... ...