Skip to content

Commit

Permalink
Merge branch 'main' into lamberto.basti/jdefault_ij_version
Browse files Browse the repository at this point in the history
  • Loading branch information
Walingar authored Oct 13, 2023
2 parents 0bac122 + fc84306 commit 9bc74a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions core/src/main/kotlin/org/jetbrains/jewel/IconButton.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
)
Expand Down

0 comments on commit 9bc74a3

Please sign in to comment.