Skip to content

Commit

Permalink
Desktop AlertDialog scrim color (#358)
Browse files Browse the repository at this point in the history
JetBrains/compose-multiplatform#2580
Also, add temporary PopupDialog. In the future, it should be changed to LayerDialog.(JetBrains/compose-multiplatform#933)
  • Loading branch information
dima-avdeev-jb authored and eymar committed Jan 13, 2023
1 parent 539c42f commit 86865e8
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import androidx.compose.ui.window.PopupPositionProvider
import androidx.compose.ui.window.rememberDialogState
import java.awt.event.KeyEvent
import androidx.compose.ui.window.Dialog as CoreDialog
import androidx.compose.foundation.background
import androidx.compose.ui.input.key.KeyEventType
import androidx.compose.ui.input.key.type

Expand Down Expand Up @@ -218,9 +219,11 @@ object PopupAlertDialogProvider : AlertDialogProvider {
}
},
) {
val scrimColor = Color.Black.copy(alpha = 0.32f) //todo configure scrim color in function arguments
Box(
modifier = Modifier
.fillMaxSize()
.background(scrimColor)
.pointerInput(onDismissRequest) {
detectTapGestures(onPress = { onDismissRequest() })
},
Expand Down

0 comments on commit 86865e8

Please sign in to comment.