File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
miuix/src/commonMain/kotlin/top/yukonga/miuix/kmp/basic Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import androidx.compose.runtime.Composable
1616import androidx.compose.runtime.DisposableEffect
1717import androidx.compose.runtime.LaunchedEffect
1818import androidx.compose.runtime.MutableState
19+ import androidx.compose.runtime.derivedStateOf
1920import androidx.compose.runtime.getValue
2021import androidx.compose.runtime.mutableStateListOf
2122import androidx.compose.runtime.mutableStateOf
@@ -150,12 +151,10 @@ fun ListPopup(
150151 Box (
151152 modifier = popupModifier
152153 .pointerInput(Unit ) {
153- detectTapGestures(
154- onTap = {
155- dismissPopup(show)
156- onDismissRequest?.let { it1 -> it1() }
157- }
158- )
154+ detectTapGestures {
155+ dismissPopup(show)
156+ onDismissRequest?.let { it1 -> it1() }
157+ }
159158 }
160159 .layout { measurable, constraints ->
161160 val placeable = measurable.measure(
@@ -179,12 +178,13 @@ fun ListPopup(
179178 }
180179 }
181180 ) {
181+ val shape = remember { derivedStateOf { SmoothRoundedCornerShape (16 .dp) } }
182182 Box (
183183 Modifier
184184 .align(AbsoluteAlignment .TopLeft )
185185 .graphicsLayer(
186186 clip = true ,
187- shape = SmoothRoundedCornerShape ( 16 .dp) ,
187+ shape = shape.value ,
188188 shadowElevation = dropdownElevation,
189189 ambientShadowColor = MiuixTheme .colorScheme.windowDimming,
190190 spotShadowColor = MiuixTheme .colorScheme.windowDimming
You can’t perform that action at this time.
0 commit comments