File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed
composeApp/src/commonMain/kotlin/component
miuix/src/commonMain/kotlin/top/yukonga/miuix/kmp/extra Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -362,6 +362,7 @@ fun dialog2(showDialog: MutableState<Boolean>) {
362362 items = dropdownOptions,
363363 selectedIndex = dropdownSelectedOption.value,
364364 onSelectedIndexChange = { newOption -> dropdownSelectedOption.value = newOption },
365+ popupHorizontalPadding = 12 .dp + 24 .dp
365366 )
366367 }
367368 Spacer (Modifier .height(12 .dp))
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ fun SuperDialog(
7070 content : @Composable () -> Unit
7171) {
7272 @Suppress(" NAME_SHADOWING" )
73- val insideMargin = remember { insideMargin } ? : remember { DpSize (14 .dp, 14 .dp) }
73+ val insideMargin = remember { insideMargin } ? : remember { DpSize (12 .dp, 12 .dp) }
7474 val paddingModifier = remember(insideMargin) {
7575 Modifier .padding(horizontal = insideMargin.width).padding(bottom = insideMargin.height)
7676 }
Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ fun SuperDropdown(
102102 items : List <String >,
103103 alwaysRight : Boolean = false,
104104 insideMargin : DpSize = DpSize (16.dp, 16.dp),
105+ popupHorizontalPadding : Dp = 12.dp,
105106 defaultWindowInsetsPadding : Boolean = true,
106107 selectedIndex : Int ,
107108 onSelectedIndexChange : (Int ) -> Unit ,
@@ -226,7 +227,7 @@ fun SuperDropdown(
226227 ) {
227228 LazyColumn (
228229 modifier = Modifier
229- .padding(horizontal = 14 .dp )
230+ .padding(horizontal = popupHorizontalPadding )
230231 .onGloballyPositioned { layoutCoordinates ->
231232 dropdownHeightPx = layoutCoordinates.size.height
232233 offsetPx = calculateOffsetPx(
You can’t perform that action at this time.
0 commit comments