From 7f9a4fd7d9435e0fd3743b48e232af64b08bf39d Mon Sep 17 00:00:00 2001 From: fscarponi Date: Mon, 11 Dec 2023 12:15:18 +0100 Subject: [PATCH] fix paddings --- .../kotlin/org/jetbrains/jewel/bridge/theme/IntUiBridge.kt | 1 + .../jewel/intui/standalone/styling/IntUiMenuStyling.kt | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/theme/IntUiBridge.kt b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/theme/IntUiBridge.kt index fd192a0141..cb57ad9fcb 100644 --- a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/theme/IntUiBridge.kt +++ b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/theme/IntUiBridge.kt @@ -576,6 +576,7 @@ private fun readMenuStyle(): MenuStyle { ), separatorThickness = retrieveIntAsDpOrUnspecified("PopupMenuSeparator.stripeWidth") .takeOrElse { 0.dp }, + iconSize = 16.dp ), submenuMetrics = SubmenuMetrics(offset = DpOffset(0.dp, (-8).dp)), ), diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiMenuStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiMenuStyling.kt index 2eac84e45c..08c7e20ddb 100644 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiMenuStyling.kt +++ b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiMenuStyling.kt @@ -162,10 +162,11 @@ public fun MenuMetrics.Companion.defaults( public fun MenuItemMetrics.Companion.defaults( selectionCornerSize: CornerSize = CornerSize(4.dp), - outerPadding: PaddingValues = PaddingValues(horizontal = 4.dp), - contentPadding: PaddingValues = PaddingValues(horizontal = 12.dp, vertical = 4.dp), + outerPadding: PaddingValues = PaddingValues(horizontal = 6.dp), + contentPadding: PaddingValues = PaddingValues(horizontal = 10.dp, vertical = 4.dp), separatorPadding: PaddingValues = PaddingValues(horizontal = 12.dp, vertical = 4.dp), separatorThickness: Dp = 1.dp, + iconSize: Dp = 16.dp, ): MenuItemMetrics = MenuItemMetrics( selectionCornerSize, @@ -173,6 +174,7 @@ public fun MenuItemMetrics.Companion.defaults( contentPadding, separatorPadding, separatorThickness, + iconSize ) public fun SubmenuMetrics.Companion.defaults(