Browse Source

style(dialog): 调整对话框背景色以适配深色模式

chendeben 9 tháng trước cách đây
mục cha
commit
f506963080

+ 1 - 2
entry/src/main/ets/dialog/AddSongsToPlaylistDialog.ets

@@ -146,7 +146,6 @@ struct AddSongsToPlaylistDialogContent {
     }, 200)
   }
 
-  // 改进的加载更多数据方法
   loadMoreData() {
     console.info('loadMoreData  called, hasMoreData:', this.hasMoreData, 'isLoading:', this.isLoading)
 
@@ -289,7 +288,7 @@ struct AddSongsToPlaylistDialogContent {
     }
     .width('100%')
     .constraintSize({ maxWidth: 400 })
-    .backgroundColor(this.isDarkMode ? '#1C1C1E' : $r('app.color.dialog_background'))
+    .backgroundColor(this.isDarkMode ? '#2C2C2E' : $r('app.color.dialog_background'))
     .borderRadius(12)
     .padding({ left: 20, right: 20 })
   }

+ 3 - 3
entry/src/main/ets/dialog/AddToPlaylistDialog.ets

@@ -102,7 +102,7 @@ struct AddToPlaylistDialogContent {
       }
       .width('100%')
       .height(44)
-      .backgroundColor(this.isDarkMode ? '#2C2C2E' : $r('app.color.input_background'))
+      .backgroundColor(this.isDarkMode ? '#000000' : $r('app.color.input_background'))
       .borderRadius(8)
       .onClick(() => {
         this.onCreateNew?.()
@@ -208,7 +208,7 @@ struct AddToPlaylistDialogContent {
         Button('添加')
           .width('45%')
           .height(40)
-          .backgroundColor(this.isDarkMode ? themeColorWithAlpha(this.themeColor, 0.8, this.isDarkMode) : this.themeColor)
+          .backgroundColor(this.isDarkMode ? '#000000' : this.themeColor)
           .borderRadius(8)
           .fontSize(14)
           .fontColor(Color.White)
@@ -224,7 +224,7 @@ struct AddToPlaylistDialogContent {
     }
     .width('90%')
     .constraintSize({ maxWidth: 400 })
-    .backgroundColor(this.isDarkMode ? '#1C1C1E' : $r('app.color.dialog_background'))
+    .backgroundColor(this.isDarkMode ? '#2C2C2E' : $r('app.color.dialog_background'))
     .borderRadius(12)
     .padding({ left: 20, right: 20 })
   }

+ 3 - 3
entry/src/main/ets/dialog/PlaylistDialog.ets

@@ -149,7 +149,7 @@ struct PlaylistDialogContent {
         TextInput({ placeholder: '请输入歌单名称', text: this.playlistName })
           .width('100%')
           .height(40)
-          .backgroundColor(this.isDarkMode ? '#2C2C2E' : $r('app.color.input_background'))
+          // .backgroundColor(this.isDarkMode ? '#2C2C2E' : $r('app.color.input_background'))
           .borderRadius(8)
           .padding({ left: 12, right: 12 })
           .fontSize(14)
@@ -173,7 +173,7 @@ struct PlaylistDialogContent {
         TextArea({ placeholder: '请输入歌单描述', text: this.playlistDescription })
           .width('100%')
           .height(80)
-          .backgroundColor(this.isDarkMode ? '#2C2C2E' : $r('app.color.input_background'))
+          // .backgroundColor(this.isDarkMode ? '#2C2C2E' : $r('app.color.input_background'))
           .borderRadius(8)
           .padding({ left: 12, right: 12, top: 8, bottom: 8 })
           .fontSize(14)
@@ -217,7 +217,7 @@ struct PlaylistDialogContent {
       .margin({ top: 20, bottom: 20 })
     }
     .width('100%')
-    .backgroundColor(this.isDarkMode ? '#1C1C1E' : $r('app.color.dialog_background'))
+    // .backgroundColor(this.isDarkMode ? '#1C1C1E' : $r('app.color.dialog_background'))
     .borderRadius(12)
     .padding({ left: 20, right: 20 })
   }