From 6102f6a1eb10bb3837ba4b72a8c665a5ebd594dd Mon Sep 17 00:00:00 2001 From: fscarponi Date: Mon, 11 Dec 2023 11:35:01 +0100 Subject: [PATCH] style updade --- ui/src/main/kotlin/org/jetbrains/jewel/ui/component/Menu.kt | 4 ++-- .../org/jetbrains/jewel/ui/component/styling/MenuStyling.kt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/Menu.kt b/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/Menu.kt index 65c0296b6f..2c71566b92 100644 --- a/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/Menu.kt +++ b/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/Menu.kt @@ -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)) { @@ -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() } diff --git a/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/styling/MenuStyling.kt b/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/styling/MenuStyling.kt index 1f95db5954..0e677c2c22 100644 --- a/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/styling/MenuStyling.kt +++ b/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/styling/MenuStyling.kt @@ -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