chendeben 1 год назад
Родитель
Сommit
f00e3dfdff
1 измененных файлов с 15 добавлено и 13 удалено
  1. 15 13
      entry/src/main/ets/pages/SettingPage.ets

+ 15 - 13
entry/src/main/ets/pages/SettingPage.ets

@@ -42,12 +42,14 @@ export struct SettingPage {
     .setLeftIcon($r('app.media.left_back_white'))
     .setTitleName('通用设置')
     .setTitleFontColor(Color.White)
-    .setTitleBarBackground($r('app.color.title_bar_bg'))
-    .setLeftTitleBackground($r('app.color.title_bar_bg'))
-    .setTitleBarBottomLineColor($r('app.color.title_bar_bg'))
+    .setTitleBarBackground($r('app.color.tab_item_bg'))
+    .setLeftTitleBackground($r('app.color.tab_item_bg'))
+    .setTitleBarBottomLineColor($r('app.color.tab_item_bg'))
     .setOnLeftClickListener(() => {
       router.back()
     })
+    .setTitleBarMinHeight(44)
+    .setTitleBarNormalPadding(0)
   @State verName: string = ''
 
   apiDialogController: CustomDialogController = new CustomDialogController({
@@ -191,7 +193,7 @@ export struct SettingPage {
                 .fontWeight(480)
                 .layoutWeight(1)
               Toggle({ type: ToggleType.Switch, isOn: this.isDarkMode })
-                .selectedColor($r('app.color.title_bar_bg'))
+                .selectedColor($r('app.color.tab_item_bg'))
                 .switchPointColor(Color.White)
                 .margin({ right: 18 })
                 .onChange((checked: boolean) => {
@@ -202,9 +204,9 @@ export struct SettingPage {
             }
             .height(55)
           }
-          .backgroundColor(Color.White)
+          .backgroundColor($r('app.color.settings_background_main'))
           .borderRadius(20)
-          .margin({ left: 0, right: 0, top: 0, bottom: 18 })
+          .margin({ left: 0, right: 0, top: 0, bottom: 10 })
           .padding(0)
 
           // 音频设置分组
@@ -228,7 +230,7 @@ export struct SettingPage {
                 .fontWeight(480)
                 .layoutWeight(1)
               Toggle({ type: ToggleType.Switch, isOn: this.isMusicMemoryPlay })
-                .selectedColor($r('app.color.title_bar_bg'))
+                .selectedColor($r('app.color.tab_item_bg'))
                 .switchPointColor(Color.White)
                 .margin({ right: 18 })
                 .onChange((checked: boolean) => {
@@ -278,7 +280,7 @@ export struct SettingPage {
                 .fontWeight(480)
                 .layoutWeight(1)
               Toggle({ type: ToggleType.Switch, isOn: this.isMusicBGCover })
-                .selectedColor($r('app.color.title_bar_bg'))
+                .selectedColor($r('app.color.tab_item_bg'))
                 .switchPointColor(Color.White)
                 .margin({ right: 18 })
                 .onChange((checked: boolean) => {
@@ -290,9 +292,9 @@ export struct SettingPage {
             }
             .height(55)
           }
-          .backgroundColor(Color.White)
+          .backgroundColor($r('app.color.settings_background_main'))
           .borderRadius(20)
-          .margin({ left: 0, right: 0, top: 0, bottom: 18 })
+          .margin({ left: 0, right: 0, top: 0, bottom: 10 })
           .padding(0)
 
           // API设置分组
@@ -352,12 +354,12 @@ export struct SettingPage {
             }
             .height(55)
           }
-          .backgroundColor(Color.White)
+          .backgroundColor($r('app.color.settings_background_main'))
           .borderRadius(20)
-          .margin({ left: 0, right: 0, top: 0, bottom: 18 })
+          .margin({ left: 0, right: 0, top: 0, bottom: 10 })
           .padding(0)
         }
-        .margin({ left: 25, right: 25, top: 20, bottom: 50 })
+        .margin({ left: 25, right: 25, top: 2, bottom: 30 })
         .justifyContent(FlexAlign.Start)
       }
       .scrollBar(BarState.Auto)