File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed
androidMain/kotlin/com/vanpra/composematerialdialogs
commonMain/kotlin/com/vanpra/composematerialdialogs
desktopMain/kotlin/com/vanpra/composematerialdialogs Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ private fun SecurePolicy.toSecureFlagPolicy(): SecureFlagPolicy {
65
65
}
66
66
67
67
@Composable
68
- internal actual fun defaultDialogShape ( ): Shape = MaterialTheme .shapes.medium
68
+ internal actual fun getDialogShape ( shape : Shape ): Shape = shape
69
69
70
70
@Composable
71
71
internal actual fun ScreenConfiguration.getMaxHeight (): Dp {
Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ fun MaterialDialog(
213
213
dialogState : MaterialDialogState = rememberMaterialDialogState(),
214
214
properties : MaterialDialogProperties = MaterialDialogProperties (),
215
215
backgroundColor : Color = MaterialTheme .colors.surface,
216
- shape : Shape = defaultDialogShape() ,
216
+ shape : Shape = MaterialTheme .shapes.medium ,
217
217
border : BorderStroke ? = null,
218
218
elevation : Dp = 24.dp,
219
219
autoDismiss : Boolean = true,
@@ -252,7 +252,7 @@ fun MaterialDialog(
252
252
.clipToBounds()
253
253
.dialogHeight()
254
254
.testTag(" dialog" ),
255
- shape = shape,
255
+ shape = getDialogShape( shape) ,
256
256
color = backgroundColor,
257
257
border = border,
258
258
elevation = elevation
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ data class MaterialDialogProperties(
90
90
val resizable : Boolean = true
91
91
)
92
92
93
- internal expect fun defaultDialogShape ( ): Shape
93
+ internal expect fun getDialogShape ( shape : Shape ): Shape
94
94
95
95
@Composable
96
96
internal expect fun ScreenConfiguration.getMaxHeight (): Dp
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import androidx.compose.runtime.CompositionLocalProvider
7
7
import androidx.compose.runtime.compositionLocalOf
8
8
import androidx.compose.ui.Modifier
9
9
import androidx.compose.ui.graphics.RectangleShape
10
+ import androidx.compose.ui.graphics.Shape
10
11
import androidx.compose.ui.unit.Dp
11
12
import androidx.compose.ui.unit.DpSize
12
13
import androidx.compose.ui.unit.dp
@@ -70,7 +71,7 @@ private fun DesktopWindowPosition.toWindowPosition(): WindowPosition {
70
71
}
71
72
72
73
@Composable
73
- internal actual fun defaultDialogShape ( ) = RectangleShape
74
+ internal actual fun getDialogShape ( shape : Shape ) = RectangleShape
74
75
75
76
@Composable
76
77
internal actual fun ScreenConfiguration.getMaxHeight (): Dp {
You can’t perform that action at this time.
0 commit comments