diff --git a/CHANGELOG.md b/CHANGELOG.md index f777def08..fbcbb51f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- Fixed unreadable dark-on-dark text in the icon/folder rename dialog when using light mode ([#198]) ## [1.10.0] - 2026-02-14 ### Added @@ -130,6 +132,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [#115]: https://github.com/FossifyOrg/Launcher/issues/115 [#170]: https://github.com/FossifyOrg/Launcher/issues/170 [#182]: https://github.com/FossifyOrg/Launcher/issues/182 +[#198]: https://github.com/FossifyOrg/Launcher/issues/198 [#230]: https://github.com/FossifyOrg/Launcher/issues/230 [#234]: https://github.com/FossifyOrg/Launcher/issues/234 [#277]: https://github.com/FossifyOrg/Launcher/issues/277 diff --git a/app/src/main/kotlin/org/fossify/home/dialogs/RenameItemDialog.kt b/app/src/main/kotlin/org/fossify/home/dialogs/RenameItemDialog.kt index 51c3eeec3..26c5e7035 100644 --- a/app/src/main/kotlin/org/fossify/home/dialogs/RenameItemDialog.kt +++ b/app/src/main/kotlin/org/fossify/home/dialogs/RenameItemDialog.kt @@ -2,6 +2,8 @@ package org.fossify.home.dialogs import android.app.Activity import android.app.AlertDialog +import android.view.ContextThemeWrapper +import com.google.android.material.dialog.MaterialAlertDialogBuilder import org.fossify.commons.extensions.* import org.fossify.commons.helpers.ensureBackgroundThread import org.fossify.home.databinding.DialogRenameItemBinding @@ -15,7 +17,17 @@ class RenameItemDialog(val activity: Activity, val item: HomeScreenGridItem, val val view = binding.root binding.renameItemEdittext.setText(item.title) - activity.getAlertDialogBuilder() + // MainActivity uses the forced-dark LauncherTheme so it can draw over the wallpaper. + // Building the Material dialog from that context keeps its surface dark even in light + // mode, producing dark text on a dark background. Wrap the context in the proper + // day/night theme so the dialog follows the system theme like the rest of the app. + val builder = if (activity.isDynamicTheme()) { + MaterialAlertDialogBuilder(ContextThemeWrapper(activity, activity.getThemeId())) + } else { + activity.getAlertDialogBuilder() + } + + builder .setPositiveButton(org.fossify.commons.R.string.ok, null) .setNegativeButton(org.fossify.commons.R.string.cancel, null) .apply {