Skip to content

Commit

Permalink
style updade
Browse files Browse the repository at this point in the history
  • Loading branch information
fscarponi committed Dec 11, 2023
1 parent 300ae3e commit 6102f6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/src/main/kotlin/org/jetbrains/jewel/ui/component/Menu.kt
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ internal fun MenuItem(
if (iconResource != null) {
Icon(resource = iconResource, contentDescription = null, iconClass = iconClass)
} else {
Box(modifier = Modifier.size(16.dp)) // todo 16 dp move to style.metrics.iconSize
Box(modifier = Modifier.size(style.metrics.itemMetrics.iconSize))
}
}
Box(modifier = Modifier.weight(1f, true)) {
Expand Down Expand Up @@ -517,7 +517,7 @@ public fun MenuSubmenuItem(
if (iconResource != null) {
Icon(resource = iconResource, iconClass = iconClass, contentDescription = "")
} else {
Box(Modifier.size(16.dp)) //todo move to style.metrics.iconSize
Box(Modifier.size(style.metrics.itemMetrics.iconSize))
}
}
Box(Modifier.weight(1f)) { content() }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ public class MenuItemMetrics(
public val contentPadding: PaddingValues,
public val separatorPadding: PaddingValues,
public val separatorThickness: Dp,
public val iconSize: Dp,
) {

public companion object
Expand Down

0 comments on commit 6102f6a

Please sign in to comment.