From a24c4718af8b2904ec376e99bc91abe37d693b88 Mon Sep 17 00:00:00 2001 From: Konrad Pozniak Date: Tue, 14 Jan 2025 19:29:27 +0100 Subject: [PATCH] fix dialog background colors (#4864) In /~https://github.com/tuskyapp/Tusky/pull/4851 I changed the theme of `AccountsInListFragment`, which accidentally turned its background white for the dark theme. Additionally this fixes the color for the preference dialogs, which I think have been incorrect since the Material3 redesign. I also wondered if we should make dialogs darker for the black theme, but looks like there is not much interest in that https://chaos.social/deck/@ConnyDuck/113802937491059461 (Currently they are just the same as the dark theme) --- .../tusky/AccountsInListFragment.kt | 2 +- .../main/res/drawable/dialog_background.xml | 11 ++++++++++ app/src/main/res/values/styles.xml | 20 ++++++++++++++----- 3 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 app/src/main/res/drawable/dialog_background.xml diff --git a/app/src/main/java/com/keylesspalace/tusky/AccountsInListFragment.kt b/app/src/main/java/com/keylesspalace/tusky/AccountsInListFragment.kt index 4bb46939b8..d92b92ab08 100644 --- a/app/src/main/java/com/keylesspalace/tusky/AccountsInListFragment.kt +++ b/app/src/main/java/com/keylesspalace/tusky/AccountsInListFragment.kt @@ -75,7 +75,7 @@ class AccountsInListFragment : DialogFragment() { viewModel.load(listId) } - override fun getTheme() = R.style.TuskyDialogOverlay + override fun getTheme() = R.style.TuskyDialogFragment override fun onStart() { super.onStart() diff --git a/app/src/main/res/drawable/dialog_background.xml b/app/src/main/res/drawable/dialog_background.xml new file mode 100644 index 0000000000..bde2b56d3b --- /dev/null +++ b/app/src/main/res/drawable/dialog_background.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 21c5a10027..00afb9cf26 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -94,9 +94,9 @@ @style/TuskyButton.TextButton - @style/TuskyDialogOverlay + @style/TuskyMaterialDialogOverlay - @style/TuskyDialogOverlay + @style/TuskyAlertDialog 16dp @style/TuskyTimePickerOverlay @@ -146,12 +146,22 @@ @color/white - - + + + +