diff --git a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/theme/IntUiBridge.kt b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/theme/IntUiBridge.kt index 6fc3a066d..74611408d 100644 --- a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/theme/IntUiBridge.kt +++ b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/theme/IntUiBridge.kt @@ -903,7 +903,7 @@ private fun readTextAreaStyle(metrics: TextFieldMetrics): TextAreaStyle { val colors = TextAreaColors( background = normalBackground, - backgroundDisabled = retrieveColorOrUnspecified("TextArea.disabledBackground"), + backgroundDisabled = Color.Transparent, backgroundFocused = normalBackground, backgroundPressed = normalBackground, backgroundHovered = normalBackground, @@ -947,7 +947,7 @@ private fun readTextFieldStyle(): TextFieldStyle { val colors = TextFieldColors( background = normalBackground, - backgroundDisabled = retrieveColorOrUnspecified("TextField.disabledBackground"), + backgroundDisabled = Color.Transparent, backgroundFocused = normalBackground, backgroundPressed = normalBackground, backgroundHovered = normalBackground, diff --git a/samples/ide-plugin/src/main/kotlin/org/jetbrains/jewel/samples/ideplugin/ComponentShowcaseTab.kt b/samples/ide-plugin/src/main/kotlin/org/jetbrains/jewel/samples/ideplugin/ComponentShowcaseTab.kt index 492e5863a..4ffed6652 100644 --- a/samples/ide-plugin/src/main/kotlin/org/jetbrains/jewel/samples/ideplugin/ComponentShowcaseTab.kt +++ b/samples/ide-plugin/src/main/kotlin/org/jetbrains/jewel/samples/ideplugin/ComponentShowcaseTab.kt @@ -14,6 +14,7 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.text.input.TextFieldState import androidx.compose.foundation.text.input.rememberTextFieldState import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider @@ -123,16 +124,20 @@ private fun RowScope.ColumnOne() { DefaultButton({}, enabled = false) { Text("Default") } } - val state = rememberTextFieldState("") - TextField( - state = state, - modifier = - Modifier.width(200.dp).provideData { - set(ActionSystemTestAction.COMPONENT_DATA_KEY.name, "TextField") - lazy(ActionSystemTestAction.COMPONENT_DATA_KEY.name) { Math.random().toString() } - }, - placeholder = { Text("Write something...") }, - ) + Row(horizontalArrangement = Arrangement.spacedBy(16.dp)) { + val state = rememberTextFieldState("") + TextField( + state = state, + modifier = + Modifier.width(200.dp).provideData { + set(ActionSystemTestAction.COMPONENT_DATA_KEY.name, "TextField") + lazy(ActionSystemTestAction.COMPONENT_DATA_KEY.name) { Math.random().toString() } + }, + placeholder = { Text("Write something...") }, + ) + + TextField(TextFieldState("Can't write here, I'm disabled"), enabled = false) + } var checked by remember { mutableStateOf(false) } var validated by remember { mutableStateOf(false) }