Răsfoiți Sursa

feat: 优化

HapeLee 3 luni în urmă
părinte
comite
efea297da7

+ 2 - 2
app/src/main/AndroidManifest.xml

@@ -242,14 +242,14 @@
         <!-- 书源编辑 -->
         <activity
             android:name=".ui.book.source.edit.BookSourceEditActivity"
-            android:enableOnBackInvokedCallback="true"
+            android:enableOnBackInvokedCallback="false"
             android:configChanges="locale|layoutDirection|uiMode|keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout"
             android:launchMode="singleTask"
             android:windowSoftInputMode="adjustResize|stateHidden" />
         <!-- 订阅源编辑 -->
         <activity
             android:name=".ui.rss.source.edit.RssSourceEditActivity"
-            android:enableOnBackInvokedCallback="true"
+            android:enableOnBackInvokedCallback="false"
             android:configChanges="locale|layoutDirection|uiMode|keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout"
             android:launchMode="singleTask"
             android:windowSoftInputMode="adjustResize|stateHidden" />

+ 0 - 1
app/src/main/java/io/legado/app/ui/book/read/ReadBookScreen.kt

@@ -78,7 +78,6 @@ fun ReadBookScreen(
         when {
             state.activeSheet != null -> onIntent(ReadBookIntent.DismissSheet)
             state.isShowingSearchResult -> onIntent(ReadBookIntent.ExitSearch)
-            state.menuVisible -> onIntent(ReadBookIntent.ReadMenuBack)
             state.isAutoPage -> onIntent(ReadBookIntent.StopAutoPage)
             else -> onIntent(ReadBookIntent.CloseReadBook())
         }

+ 25 - 5
app/src/main/java/io/legado/app/ui/book/readaloud/player/ReadAloudPlayerScreen.kt

@@ -810,6 +810,13 @@ private fun ReadAloudBackground(
             Box(modifier = modifier.fillMaxSize())
         }
 
+        ReadAloudBgMode.Solid -> {
+            CoverBlurBackdrop(
+                state.bookName, state.author, state.coverPath, state.sourceOrigin,
+                modifier = modifier,
+            )
+        }
+
         else -> {
             Box(
                 modifier = modifier
@@ -823,14 +830,27 @@ private fun ReadAloudBackground(
 @Composable
 private fun rememberCoverDerivedPreset(): BgEffectConfig.Config {
     val primary = LegadoTheme.colorScheme.primary
-    val surface = LegadoTheme.colorScheme.surfaceContainerLowest
+    val surface = LegadoTheme.colorScheme.secondaryContainer
     val tertiary = LegadoTheme.colorScheme.secondary
     val isDark = LegadoTheme.isDark
 
-    return remember(primary, surface, tertiary) {
-        val p = primary.toShaderColor()
-        val s = surface.toShaderColor()
-        val t = tertiary.toShaderColor()
+    return remember(primary, surface, tertiary, isDark) {
+        val darken = if (isDark) 0.68f else 0.88f
+        val p = primary.copy(
+            red = primary.red * darken,
+            green = primary.green * darken,
+            blue = primary.blue * darken,
+        ).toShaderColor()
+        val s = surface.copy(
+            red = surface.red * darken,
+            green = surface.green * darken,
+            blue = surface.blue * darken,
+        ).toShaderColor()
+        val t = tertiary.copy(
+            red = tertiary.red * darken,
+            green = tertiary.green * darken,
+            blue = tertiary.blue * darken,
+        ).toShaderColor()
 
         val m = floatArrayOf(
             (p[0] + t[0]) / 2f,

+ 1 - 1
app/src/main/java/io/legado/app/ui/book/readaloud/player/ReadAloudPlayerViewModel.kt

@@ -60,7 +60,7 @@ class ReadAloudPlayerViewModel(
             ReadAloudBgMode.Solid -> ReadAloudBgMode.Blur
             ReadAloudBgMode.Blur -> ReadAloudBgMode.FlowingLight
             ReadAloudBgMode.FlowingLight -> ReadAloudBgMode.Transparent
-            else -> ReadAloudBgMode.Solid
+            else -> ReadAloudBgMode.Blur
         }
         AppConfigStore.putInt(PreferKey.readAloudPlayerBgMode, next)
     }

+ 4 - 0
app/src/main/res/values-zh-rCN/strings.xml

@@ -1533,6 +1533,10 @@
     <string name="theme_config_nav_icons_default">使用默认图标</string>
     <string name="theme_config_add_nav_icon">添加%1$s图标</string>
     <string name="theme_config_no_font_files">没有字体文件</string>
+    <string name="theme_config_reset_defaults">恢复默认主题配置</string>
+    <string name="theme_config_reset_defaults_summary">恢复外观页设置,不影响已保存主题和封面</string>
+    <string name="theme_config_reset_defaults_confirm">将恢复外观页中的主题、界面布局、背景图片、应用字体和导航图标等配置。已保存的主题、封面图集和书籍封面不会被删除。</string>
+    <string name="theme_config_reset_success">已恢复默认主题配置</string>
     <string name="input_value_range">输入数值(%1$d-%2$d)</string>
     <string name="change_icon_success">图标已修改</string>
     <string name="replace_rule_title_setting">配置替换规则</string>

+ 4 - 0
app/src/main/res/values/strings.xml

@@ -1083,6 +1083,10 @@
     <string name="export_file_name_template_hint">{name} - {author}</string>
     <string name="export_file_name_template_help">Available variables: {name} title, {author} author, {group} group, {source} source, {remark} remark.\n\nExample: {name} - {author}\nResult: The Three-Body Problem - Liu Cixin\n\nYou can add fixed text before or after variables.</string>
     <string name="reset">Reset</string>
+    <string name="theme_config_reset_defaults">Restore default theme configuration</string>
+    <string name="theme_config_reset_defaults_summary">Reset appearance settings without affecting saved themes or covers</string>
+    <string name="theme_config_reset_defaults_confirm">This will reset theme, layout, background image, app font, and navigation icon settings on the appearance page. Saved themes, cover albums, and book covers will not be deleted.</string>
+    <string name="theme_config_reset_success">Default theme configuration restored</string>
     <string name="null_url">Null URL</string>
     <string name="dict">dict</string>
     <string name="unknown_error">unknown error</string>