Skip to content

Commit

Permalink
remove unnecessary box
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Morgillo <[email protected]>
  • Loading branch information
hamen committed Oct 15, 2024
1 parent e09100f commit 4d3efd6
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions ui/src/main/kotlin/org/jetbrains/jewel/ui/component/ComboBox.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import androidx.compose.foundation.interaction.HoverInteraction
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.interaction.PressInteraction
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.BoxWithConstraints
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
Expand Down Expand Up @@ -257,21 +256,19 @@ public fun ComboBox(
}
},
) {
Box(contentAlignment = Alignment.Center, modifier = Modifier.fillMaxWidth()) {
val iconColor = if (isEnabled) Color.Unspecified else style.colors.borderDisabled
Divider(
orientation = Orientation.Vertical,
thickness = style.metrics.borderWidth,
color = style.colors.border,
modifier = Modifier.testTag("Jewel.ComboBox.Divider").align(Alignment.CenterStart),
)
Icon(
modifier = Modifier.size(style.metrics.arrowSize).align(Alignment.Center),
key = style.icons.chevronDown,
tint = iconColor,
contentDescription = null,
)
}
val iconColor = if (isEnabled) Color.Unspecified else style.colors.borderDisabled
Divider(
orientation = Orientation.Vertical,
thickness = style.metrics.borderWidth,
color = style.colors.border,
modifier = Modifier.testTag("Jewel.ComboBox.Divider"),
)
Icon(
modifier = Modifier.size(style.metrics.arrowSize).weight(1f),
key = style.icons.chevronDown,
tint = iconColor,
contentDescription = null,
)
}
}
}
Expand Down

0 comments on commit 4d3efd6

Please sign in to comment.