|
|
@@ -700,33 +700,51 @@ export struct SettingPage {
|
|
|
// Line().width('100%').height(0.3).backgroundColor($r('app.color.index_tab_unselected_font_color'))
|
|
|
// .visibility(Visibility.None)
|
|
|
// 网格布局
|
|
|
+ // 网格布局
|
|
|
Row() {
|
|
|
- SymbolGlyph($r('sys.symbol.square_grid_2x2'))
|
|
|
+ SymbolGlyph($r('sys.symbol.more'))
|
|
|
.fontSize(20)
|
|
|
.fontColor([this.themeColor])
|
|
|
.alignSelf(ItemAlign.Center)
|
|
|
.margin({ left: 15 })
|
|
|
- Text('卡片模式')
|
|
|
+ Text('布局模式')
|
|
|
.margin({ left: 8 })
|
|
|
.fontSize(15)
|
|
|
.fontColor(Color.Gray)
|
|
|
.fontWeight(480)
|
|
|
.layoutWeight(1)
|
|
|
- Toggle({ type: ToggleType.Switch, isOn: this.isGridMusic })
|
|
|
- .selectedColor(this.themeColor)
|
|
|
- .switchPointColor(Color.White)
|
|
|
+ Select([
|
|
|
+ { value: CommonConstants.DEFAULT_LAYOUT[0] },
|
|
|
+ { value: CommonConstants.DEFAULT_LAYOUT[1] },
|
|
|
+ { value: CommonConstants.DEFAULT_LAYOUT[2] }])
|
|
|
+ .font({ size: 15, weight: FontWeight.Medium })
|
|
|
+ .fontColor(Color.Gray)
|
|
|
.margin({ right: 18 })
|
|
|
- .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
- .onChange((checked: boolean) => {
|
|
|
- this.isGridMusic = checked;
|
|
|
- PreferencesUtil.put(SettingPage.IS_GRID_MUSIC, this.isGridMusic)
|
|
|
+ .selected(this.twoFingerType==4?0:
|
|
|
+ this.isGridMusic?2:1)
|
|
|
+ .value(CommonConstants.DEFAULT_LAYOUT[this.twoFingerType==4?0:
|
|
|
+ this.isGridMusic?2:1])
|
|
|
+ .onSelect(async (_index: number, text?: string | undefined) => {
|
|
|
+ if(_index == 0){
|
|
|
+ PreferencesUtil.put(SettingPage.TWO_FINGER_TYPE,4)
|
|
|
+ }else{
|
|
|
+ if(this.twoFingerType!=4){
|
|
|
+ PreferencesUtil.put(SettingPage.TWO_FINGER_TYPE,this.twoFingerType)
|
|
|
+ }else{
|
|
|
+ PreferencesUtil.put(SettingPage.TWO_FINGER_TYPE,3)
|
|
|
+ }
|
|
|
+ if(_index == 1){
|
|
|
+ PreferencesUtil.put(SettingPage.IS_GRID_MUSIC,false)
|
|
|
+ }else{
|
|
|
+ PreferencesUtil.put(SettingPage.IS_GRID_MUSIC,true)
|
|
|
+ }
|
|
|
+ }
|
|
|
this.sendChangeEvent()
|
|
|
})
|
|
|
- .width(50)
|
|
|
- .height(30);
|
|
|
+
|
|
|
}
|
|
|
.height(55)
|
|
|
- .clickEffect({ level: ClickEffectLevel.HEAVY })
|
|
|
+ .clickEffect({level:ClickEffectLevel.HEAVY})
|
|
|
Line().width('100%').height(0.3).backgroundColor($r('app.color.index_tab_unselected_font_color'))
|
|
|
// 封面方形
|
|
|
Row() {
|