style: Make legacy dialog consistent with compose dialog

This commit is contained in:
ziro 2024-01-15 09:55:54 +07:00
parent c51ae2e241
commit a80b7f16ba
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
4 changed files with 14 additions and 5 deletions

View file

@ -12,7 +12,6 @@ import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.TextButton import androidx.compose.material3.TextButton
import androidx.compose.material3.TopAppBarDefaults import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.material3.rememberTopAppBarState import androidx.compose.material3.rememberTopAppBarState
import androidx.compose.material3.surfaceColorAtElevation
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState import androidx.compose.runtime.collectAsState
@ -23,7 +22,6 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import androidx.lifecycle.viewmodel.compose.viewModel import androidx.lifecycle.viewmodel.compose.viewModel
import dev.yokai.presentation.AppBarType import dev.yokai.presentation.AppBarType
@ -62,7 +60,7 @@ fun ExtensionRepoScreen(
if (repoToDelete != null) if (repoToDelete != null)
AlertDialog( AlertDialog(
containerColor = MaterialTheme.colorScheme.onPrimary, containerColor = MaterialTheme.colorScheme.surface,
title = { title = {
Text( Text(
text = stringResource(R.string.notice_delete_repo_title), text = stringResource(R.string.notice_delete_repo_title),

View file

@ -332,7 +332,7 @@
<string name="ext_installer_private" translatable="false">Private</string> <string name="ext_installer_private" translatable="false">Private</string>
<string name="ext_installer_summary">Allows extensions to be installed without user prompts and enables automatic updates for devices under Android 12</string> <string name="ext_installer_summary">Allows extensions to be installed without user prompts and enables automatic updates for devices under Android 12</string>
<string name="untrusted_extension">Untrusted extension</string> <string name="untrusted_extension">Untrusted extension</string>
<string name="untrusted_extension_message">Malicious extensions can read any stored login credentials or execute arbitrary code.\n\nBy trusting this certificate you accept these risks.</string> <string name="untrusted_extension_message">Malicious extensions can read any stored login credentials or execute arbitrary code.\n\nBy trusting this extension you accept these risks.</string>
<string name="obsolete_extension_message">This extension is no longer available.</string> <string name="obsolete_extension_message">This extension is no longer available.</string>
<string name="unofficial_extension_message">This extension is not from the official Tachiyomi extensions list.</string> <string name="unofficial_extension_message">This extension is not from the official Tachiyomi extensions list.</string>
<string name="version_">Version: %1$s</string> <string name="version_">Version: %1$s</string>

View file

@ -185,6 +185,16 @@
<item name="android:textColorHint">@color/material_on_background_disabled</item> <item name="android:textColorHint">@color/material_on_background_disabled</item>
</style> </style>
<style name="Theme.Widget.Yokai.AlertDialog" parent="ThemeOverlay.Material3.MaterialAlertDialog">
<item name="alertDialogStyle">@style/Widget.Yokai.AlertDialog</item>
<item name="elevationOverlayEnabled">true</item>
<item name="elevationOverlayColor">?colorSecondary</item>
</style>
<style name="Widget.Yokai.AlertDialog" parent="MaterialAlertDialog.Material3">
<item name="backgroundTint">?attr/colorSurface</item>
</style>
<!--=================--> <!--=================-->
<!--Widgets.TabLayout--> <!--Widgets.TabLayout-->
<!--=================--> <!--=================-->

View file

@ -68,6 +68,7 @@
<item name="bottomSheetDialogTheme">@style/BottomSheetDialogTheme</item> <item name="bottomSheetDialogTheme">@style/BottomSheetDialogTheme</item>
<item name="actionBarTheme">@style/Theme.ActionBar.DayNight</item> <item name="actionBarTheme">@style/Theme.ActionBar.DayNight</item>
<item name="preferenceTheme">@style/Tachiyomi.PreferenceTheme</item> <item name="preferenceTheme">@style/Tachiyomi.PreferenceTheme</item>
<item name="materialAlertDialogTheme">@style/Theme.Widget.Yokai.AlertDialog</item>
<!-- Custom Attributes--> <!-- Custom Attributes-->
<item name="actionBarTintColor">?attr/colorOnBackground</item> <item name="actionBarTintColor">?attr/colorOnBackground</item>