|
|
@@ -796,33 +796,45 @@ export struct SettingPage {
|
|
|
.height(55)
|
|
|
.clickEffect({ level: ClickEffectLevel.HEAVY })
|
|
|
|
|
|
- Line().width('100%').height(0.3).backgroundColor($r('app.color.index_tab_unselected_font_color'))
|
|
|
- // 封面顶部
|
|
|
- Row() {
|
|
|
- Text('顶部大封面')
|
|
|
- .margin({ left: 18 })
|
|
|
- .fontSize(15)
|
|
|
- .fontColor(Color.Gray)
|
|
|
- .fontWeight(480)
|
|
|
- .layoutWeight(1)
|
|
|
- Toggle({ type: ToggleType.Switch, isOn: this.isCoverTopBig })
|
|
|
- .selectedColor(this.themeColor)
|
|
|
- .switchPointColor(Color.White)
|
|
|
- .margin({ right: 18 })
|
|
|
- .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
- .onChange((checked: boolean) => {
|
|
|
- this.isCoverTopBig = checked;
|
|
|
- if(this.isCoverTopBig){
|
|
|
- ToastUtil.showToast('启动该开关部分设备封面太大导致和音乐控制重叠!')
|
|
|
- }
|
|
|
- PreferencesUtil.put(SettingPage.IS_COVER_TOP_BIG, this.isCoverTopBig)
|
|
|
- this.sendChangeEvent()
|
|
|
+ Line().width('100%').height(0.3).backgroundColor($r('app.color.index_tab_unselected_font_color'))
|
|
|
+ .opacity(this.isCoverTop ? 1 : 0)
|
|
|
+ .visibility(this.isCoverTop ? Visibility.Visible : Visibility.None)
|
|
|
+ .animation({
|
|
|
+ duration: 500,
|
|
|
+ curve: 'ease-in-out' // 可选动画曲线
|
|
|
})
|
|
|
- .width(50)
|
|
|
- .height(30);
|
|
|
- }
|
|
|
- .height(55)
|
|
|
- .clickEffect({ level: ClickEffectLevel.HEAVY })
|
|
|
+ // 封面顶部
|
|
|
+ Row() {
|
|
|
+ Text('顶部大封面')
|
|
|
+ .margin({ left: 18 })
|
|
|
+ .fontSize(15)
|
|
|
+ .fontColor(Color.Gray)
|
|
|
+ .fontWeight(480)
|
|
|
+ .layoutWeight(1)
|
|
|
+ Toggle({ type: ToggleType.Switch, isOn: this.isCoverTopBig })
|
|
|
+ .selectedColor(this.themeColor)
|
|
|
+ .switchPointColor(Color.White)
|
|
|
+ .margin({ right: 18 })
|
|
|
+ .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
+ .onChange((checked: boolean) => {
|
|
|
+ this.isCoverTopBig = checked;
|
|
|
+ if(this.isCoverTopBig){
|
|
|
+ ToastUtil.showToast('启动该开关部分设备封面太大导致和音乐控制重叠!')
|
|
|
+ }
|
|
|
+ PreferencesUtil.put(SettingPage.IS_COVER_TOP_BIG, this.isCoverTopBig)
|
|
|
+ this.sendChangeEvent()
|
|
|
+ })
|
|
|
+ .width(50)
|
|
|
+ .height(30);
|
|
|
+ }
|
|
|
+ .height(55)
|
|
|
+ .clickEffect({ level: ClickEffectLevel.HEAVY })
|
|
|
+ .opacity(this.isCoverTop ? 1 : 0)
|
|
|
+ .visibility(this.isCoverTop ? Visibility.Visible : Visibility.None)
|
|
|
+ .animation({
|
|
|
+ duration: 500,
|
|
|
+ curve: 'ease-in-out' // 可选动画曲线
|
|
|
+ })
|
|
|
|
|
|
|
|
|
Line().width('100%').height(0.3).backgroundColor($r('app.color.index_tab_unselected_font_color'))
|
|
|
@@ -1133,7 +1145,6 @@ export struct SettingPage {
|
|
|
.justifyContent(FlexAlign.Start)
|
|
|
}
|
|
|
.scrollBar(BarState.Auto)
|
|
|
- // .height(px2vp(DisplayUtil.getHeight() - AppUtil.getStatusBarHeight() - AppUtil.getNavigationIndicatorHeight()))
|
|
|
.width('100%')
|
|
|
.margin({ bottom: 10 })
|
|
|
.backgroundColor($r('app.color.settings_background'))
|