Updated the dialog dim amount to match the style guide

This commit is contained in:
Morgan Pretty 2023-06-06 16:57:27 +10:00
parent cea65f3e45
commit 9ce89087a5
5 changed files with 5 additions and 10 deletions

View File

@ -69,7 +69,6 @@ class DeleteOptionsBottomSheet : BottomSheetDialogFragment(), View.OnClickListen
override fun onStart() { override fun onStart() {
super.onStart() super.onStart()
val window = dialog?.window ?: return val window = dialog?.window ?: return
val isLightMode = UiModeUtilities.isDayUiMode(requireContext()) window.setDimAmount(0.6f)
window.setDimAmount(if (isLightMode) 0.1f else 0.75f)
} }
} }

View File

@ -60,8 +60,7 @@ class ModalUrlBottomSheet(private val url: String): BottomSheetDialogFragment(),
override fun onStart() { override fun onStart() {
super.onStart() super.onStart()
val window = dialog?.window ?: return val window = dialog?.window ?: return
val isLightMode = UiModeUtilities.isDayUiMode(requireContext()) window.setDimAmount(0.6f)
window.setDimAmount(if (isLightMode) 0.1f else 0.75f)
} }
override fun onClick(v: View?) { override fun onClick(v: View?) {

View File

@ -14,8 +14,7 @@ open class BaseDialog : DialogFragment() {
val builder = AlertDialog.Builder(requireContext()) val builder = AlertDialog.Builder(requireContext())
setContentView(builder) setContentView(builder)
val result = builder.create() val result = builder.create()
val isLightMode = UiModeUtilities.isDayUiMode(requireContext()) result.window?.setDimAmount(0.6f)
result.window?.setDimAmount(if (isLightMode) 0.1f else 0.75f)
return result return result
} }

View File

@ -88,7 +88,6 @@ class ConversationOptionsBottomSheet(private val parentContext: Context) : Botto
override fun onStart() { override fun onStart() {
super.onStart() super.onStart()
val window = dialog?.window ?: return val window = dialog?.window ?: return
val isLightMode = UiModeUtilities.isDayUiMode(requireContext()) window.setDimAmount(0.6f)
window.setDimAmount(if (isLightMode) 0.1f else 0.75f)
} }
} }

View File

@ -117,8 +117,7 @@ class UserDetailsBottomSheet: BottomSheetDialogFragment() {
override fun onStart() { override fun onStart() {
super.onStart() super.onStart()
val window = dialog?.window ?: return val window = dialog?.window ?: return
val isLightMode = UiModeUtilities.isDayUiMode(requireContext()) window.setDimAmount(0.6f)
window.setDimAmount(if (isLightMode) 0.1f else 0.75f)
} }
fun saveNickName(recipient: Recipient) = with(binding) { fun saveNickName(recipient: Recipient) = with(binding) {