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() {
super.onStart()
val window = dialog?.window ?: return
val isLightMode = UiModeUtilities.isDayUiMode(requireContext())
window.setDimAmount(if (isLightMode) 0.1f else 0.75f)
window.setDimAmount(0.6f)
}
}

View File

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

View File

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

View File

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

View File

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