From b18571c1e56e0f007ac286c72aef9cf7a5c86ad5 Mon Sep 17 00:00:00 2001 From: HuanCheng65 <22636177+HuanCheng65@users.noreply.github.com> Date: Thu, 1 Feb 2024 16:26:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=8A=B6=E6=80=81=E6=A0=8F=E9=81=AE?= =?UTF-8?q?=E7=BD=A9=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../page/settings/custom/CustomSettingsPage.kt | 18 ++++++++++++++++++ app/src/main/res/drawable/ic_beaker.xml | 12 ++++++++++++ app/src/main/res/values/strings.xml | 2 ++ 3 files changed, 32 insertions(+) create mode 100644 app/src/main/res/drawable/ic_beaker.xml diff --git a/app/src/main/java/com/huanchengfly/tieba/post/ui/page/settings/custom/CustomSettingsPage.kt b/app/src/main/java/com/huanchengfly/tieba/post/ui/page/settings/custom/CustomSettingsPage.kt index 52ecdcce..bd7bd7d6 100644 --- a/app/src/main/java/com/huanchengfly/tieba/post/ui/page/settings/custom/CustomSettingsPage.kt +++ b/app/src/main/java/com/huanchengfly/tieba/post/ui/page/settings/custom/CustomSettingsPage.kt @@ -25,9 +25,11 @@ import androidx.compose.runtime.remember import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringArrayResource import androidx.compose.ui.res.stringResource +import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.datastore.preferences.core.stringPreferencesKey @@ -236,6 +238,22 @@ fun CustomSettingsPage( } } } + prefsItem { + SwitchPref( + key = "status_bar_darker", + title = stringResource(id = R.string.title_settings_status_bar_darker), + summary = stringResource(id = R.string.summary_settings_status_bar_darker), + defaultChecked = true, + ) { + LeadingIcon { + AvatarIcon( + icon = ImageVector.vectorResource(id = R.drawable.ic_beaker), + size = Sizes.Small, + contentDescription = null, + ) + } + } + } prefsItem { SwitchPref( key = "custom_toolbar_primary_color", diff --git a/app/src/main/res/drawable/ic_beaker.xml b/app/src/main/res/drawable/ic_beaker.xml new file mode 100644 index 00000000..d3068cdb --- /dev/null +++ b/app/src/main/res/drawable/ic_beaker.xml @@ -0,0 +1,12 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d008ff9d..3b2cd7ae 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -515,4 +515,6 @@ 将使用 App 内置的照片选择器 将使用原生的照片选择器 显示 + 状态栏遮罩 + 开启后非白色主题状态栏将略微变暗