diff --git a/core/src/main/kotlin/org/jetbrains/jewel/IconButton.kt b/core/src/main/kotlin/org/jetbrains/jewel/IconButton.kt index 3b6d9a428..61b4e4a2f 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/IconButton.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/IconButton.kt @@ -20,7 +20,6 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.draw.clip import androidx.compose.ui.semantics.Role import org.jetbrains.jewel.styling.IconButtonStyle @@ -70,10 +69,9 @@ fun IconButton( interactionSource = interactionSource, indication = NoIndication, ) - .clip(shape) .padding(style.metrics.padding) - .background(background) - .border(style.metrics.borderWidth, border), + .background(background, shape) + .border(style.metrics.borderWidth, border, shape), contentAlignment = Alignment.Center, content = { content(buttonState) diff --git a/core/src/main/kotlin/org/jetbrains/jewel/styling/IconButtonMetrics.kt b/core/src/main/kotlin/org/jetbrains/jewel/styling/IconButtonMetrics.kt index 04541a1b1..c34923395 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/styling/IconButtonMetrics.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/styling/IconButtonMetrics.kt @@ -49,9 +49,9 @@ interface IconButtonColors { fun borderFor(state: ButtonState) = rememberUpdatedState( when { !state.isEnabled -> borderDisabled + state.isFocused -> borderFocused state.isPressed -> borderPressed state.isHovered -> borderHovered - state.isFocused -> borderFocused else -> border }, )