新增选择图片创建主题颜色功能

This commit is contained in:
HapeLee committed 2025-10-19 00:40:46 +08:00
1 parent 0d671df389
commit 45c953024f
9 files changed
+218 -43

No files matched your search

+11 -3
View File
@@ -1,5 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<ImageView android:id="@+id/preview"
xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="48dp"
android:layout_height="48dp" />
android:layout_height="48dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
app:cardBackgroundColor="@android:color/transparent"
app:strokeWidth="0dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/preview"
android:scaleType="centerCrop"/>
</com.google.android.material.card.MaterialCardView>
+4 -1
View File
@@ -1270,7 +1270,7 @@
<string name="dark_mode">深色</string>
<string name="pure_black">纯黑深色模式</string>
<string name="transparent_theme_alarm">透明主题请于设置背景图片后设置</string>
<string name="seed_color_summary">使用种子颜色创建主题</string>
<string name="seed_color_summary">使用种子颜色生成主题颜色</string>
<string name="seed_color">种子色</string>
<string name="custom_mode">自定义模式</string>
<string name="be_swiped">仍可滑动切换页面</string>
@@ -1293,4 +1293,7 @@
<string name="add_as_new_book">新增书籍到书架</string>
<string name="quick_add_to_shelf">快速添加到书架</string>
<string name="book_added_to_shelf">书籍已添加到书架</string>
<string name="seed_photo_summary">使用图片生成主题颜色</string>
<string name="seed_photo_alart">若需使用种子颜色,请取消种子图片选择</string>
<string name="click_to_delete">点击以删除或更改</string>
</resources>
+3
View File
@@ -1294,4 +1294,7 @@
<string name="add_as_new_book">新增书籍到书架</string>
<string name="quick_add_to_shelf">快速添加到书架</string>
<string name="book_added_to_shelf">书籍已添加到书架</string>
<string name="seed_photo_summary">使用图片生成主题颜色</string>
<string name="seed_photo_alart">若需使用种子颜色,请取消种子图片选择</string>
<string name="click_to_delete">Click to delete or change</string>
</resources>
+7 -2
View File
@@ -37,6 +37,11 @@
app:cpv_dialogType="preset"
app:iconSpaceReserved="false" />
<io.legato.kazusa.lib.prefs.ImagePreviewPreference
android:key="colorImage"
android:title="种子图片"
android:summary="@string/seed_photo_summary"/>
<io.legato.kazusa.lib.prefs.NameListPreference
android:defaultValue="global"
android:key="customMode"
@@ -131,11 +136,11 @@
app:iconSpaceReserved="false"
app:layout="@layout/view_preference_category">
<io.legato.kazusa.lib.prefs.Preference
<io.legato.kazusa.lib.prefs.ImagePreviewPreference
android:key="backgroundImage"
android:title="@string/light_mode" />
<io.legato.kazusa.lib.prefs.Preference
<io.legato.kazusa.lib.prefs.ImagePreviewPreference
android:key="backgroundImageNight"
android:title="@string/dark_mode" />