diff --git a/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/Slider.kt b/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/Slider.kt index 882a240..e8859d1 100644 --- a/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/Slider.kt +++ b/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/Slider.kt @@ -63,7 +63,9 @@ import com.highcapable.flexiui.LocalColors import com.highcapable.flexiui.LocalShapes import com.highcapable.flexiui.LocalSizes import com.highcapable.flexiui.utils.borderOrNot +import com.highcapable.flexiui.utils.status import kotlin.math.roundToInt + @Immutable data class SliderColors( val trackInactiveColor: Color, @@ -165,9 +167,10 @@ fun Slider( ) } Box( - modifier = modifier.hoverable(interactionSource) + modifier = modifier.status(enabled) + .hoverable(interactionSource, enabled) .pointerInput(Unit) { - detectTapGestures( + if (enabled) detectTapGestures( onTap = { offset -> val tapedOffsetX = offset.x - thumbRadius.toPx() offsetX = tapedOffsetX.coerceIn(0f, maxOffset) diff --git a/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/TextField.kt b/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/TextField.kt index 580575f..eef1916 100644 --- a/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/TextField.kt +++ b/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/TextField.kt @@ -267,7 +267,7 @@ private fun Modifier.textField( enabled: Boolean, interactionSource: MutableInteractionSource ) = status(enabled) - .hoverable(interactionSource) + .hoverable(interactionSource, enabled) .clip(style.shape) .background(colors.backgroundColor, style.shape) .borderOrNot(border, style.shape)