File tree Expand file tree Collapse file tree
main-core/src/commonMain/kotlin/ru/bartwell/kick/core/ui
module/settings/control-panel/src/commonMain/kotlin/ru/bartwell/kick/module/controlpanel/feature/presentation
sample/shared/src/commonMain/kotlin/ru/bartwell/kick/sample/shared Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import androidx.compose.foundation.gestures.awaitFirstDown
55import androidx.compose.foundation.layout.Box
66import androidx.compose.foundation.layout.ColumnScope
77import androidx.compose.foundation.layout.width
8- import androidx.compose.material3.MenuAnchorType
98import androidx.compose.runtime.Composable
109import androidx.compose.runtime.Immutable
1110import androidx.compose.runtime.getValue
@@ -53,7 +52,7 @@ public fun ExposedDropdownMenuBox(
5352}
5453
5554public interface ExposedDropdownMenuBoxScope {
56- public fun Modifier.menuAnchor (type : MenuAnchorType = MenuAnchorType . PrimaryNotEditable ): Modifier
55+ public fun Modifier.menuAnchor (type : Any? = null ): Modifier
5756
5857 @Composable
5958 public fun DropdownMenu (
@@ -83,7 +82,7 @@ private class ExposedDropdownMenuBoxScopeImpl : ExposedDropdownMenuBoxScope {
8382 var onAnchorPositioned: ((androidx.compose.ui.layout.LayoutCoordinates ) -> Unit )? = null
8483 lateinit var density: androidx.compose.ui.unit.Density
8584
86- override fun Modifier.menuAnchor (type : MenuAnchorType ): Modifier = composed {
85+ override fun Modifier.menuAnchor (type : Any? ): Modifier = composed {
8786 this
8887 .onGloballyPositioned { onAnchorPositioned?.invoke(it) }
8988 .pointerInput(Unit ) {
Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ import androidx.compose.material3.ExperimentalMaterial3Api
2222import androidx.compose.material3.ExposedDropdownMenuDefaults
2323import androidx.compose.material3.Icon
2424import androidx.compose.material3.IconButton
25- import androidx.compose.material3.MenuAnchorType
2625import androidx.compose.material3.OutlinedTextField
2726import androidx.compose.material3.Switch
2827import androidx.compose.material3.Text
@@ -163,7 +162,7 @@ private fun StringItem(
163162 TextField (
164163 modifier = Modifier
165164 .fillMaxWidth()
166- .menuAnchor(type = MenuAnchorType . PrimaryNotEditable ),
165+ .menuAnchor(),
167166 value = selected.value,
168167 onValueChange = { },
169168 label = { Text (item.name) },
@@ -265,7 +264,7 @@ private fun NumberItemList(
265264 modifier = Modifier
266265 .fillMaxWidth()
267266 .testTag(" number_list_" + name)
268- .menuAnchor(type = MenuAnchorType . PrimaryNotEditable ),
267+ .menuAnchor(),
269268 value = selected.asString(),
270269 onValueChange = { },
271270 label = { Text (name) },
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import androidx.compose.material3.DropdownMenuItem
1212import androidx.compose.material3.ExperimentalMaterial3Api
1313import androidx.compose.material3.ExposedDropdownMenuDefaults
1414import androidx.compose.material3.MaterialTheme
15- import androidx.compose.material3.MenuAnchorType
1615import androidx.compose.material3.Surface
1716import androidx.compose.material3.Text
1817import androidx.compose.material3.TextField
@@ -87,7 +86,7 @@ private fun ThemeList(
8786 ExposedDropdownMenuDefaults .TrailingIcon (expanded = expanded)
8887 },
8988 colors = ExposedDropdownMenuDefaults .textFieldColors(),
90- modifier = Modifier .menuAnchor(type = MenuAnchorType . PrimaryNotEditable ),
89+ modifier = Modifier .menuAnchor(),
9190 )
9291 ExposedDropdownMenu (
9392 expanded = expanded,
You can’t perform that action at this time.
0 commit comments