From 345c63c38ed9b4fb6de5e3dd415d6c917c7e32b9 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 4bb46939b..d92b92ab0 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 000000000..bde2b56d3 --- /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 e44f21683..caba32269 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 @@ -144,12 +144,22 @@ @color/white - - + + + +