diff --git a/gradle.properties b/gradle.properties index 9b92976bb..9b3d31d0b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,4 +10,4 @@ org.jetbrains.intellij.platform.buildFeature.useBinaryReleases=false jdk.level=17 ijp.target=233 -jewel.release.version=0.24.1 +jewel.release.version=0.24.2 diff --git a/ide-laf-bridge/api/ide-laf-bridge.api b/ide-laf-bridge/api/ide-laf-bridge.api index 17e23d3cd..6580cdd32 100644 --- a/ide-laf-bridge/api/ide-laf-bridge.api +++ b/ide-laf-bridge/api/ide-laf-bridge.api @@ -65,8 +65,10 @@ public final class org/jetbrains/jewel/bridge/JewelBridgeException$KeysNotFoundE } public final class org/jetbrains/jewel/bridge/JewelComposePanelKt { + public static final fun JewelComposeNoThemePanel (Lkotlin/jvm/functions/Function2;)Ljavax/swing/JComponent; public static final fun JewelComposePanel (Lkotlin/jvm/functions/Function2;)Ljavax/swing/JComponent; public static final fun JewelToolWindowComposePanel (Lkotlin/jvm/functions/Function2;)Ljavax/swing/JComponent; + public static final fun JewelToolWindowNoThemeComposePanel (Lkotlin/jvm/functions/Function2;)Ljavax/swing/JComponent; public static final fun getLocalComponent ()Landroidx/compose/runtime/ProvidableCompositionLocal; } diff --git a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/JewelComposePanel.kt b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/JewelComposePanel.kt index d4a25d755..3c70dec92 100644 --- a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/JewelComposePanel.kt +++ b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/JewelComposePanel.kt @@ -35,6 +35,24 @@ public fun JewelToolWindowComposePanel(content: @Composable () -> Unit): JCompon } } +@ExperimentalJewelApi +@Suppress("ktlint:standard:function-naming", "FunctionName") // Swing to Compose bridge API +public fun JewelComposeNoThemePanel(content: @Composable () -> Unit): JComponent = + createJewelComposePanel { jewelPanel -> + setContent { CompositionLocalProvider(LocalComponent provides this@createJewelComposePanel, content = content) } + } + +@ExperimentalJewelApi +@Suppress("ktlint:standard:function-naming", "FunctionName") // Swing to Compose bridge API +public fun JewelToolWindowNoThemeComposePanel(content: @Composable () -> Unit): JComponent = + createJewelComposePanel { jewelPanel -> + setContent { + Compose17IJSizeBugWorkaround { + CompositionLocalProvider(LocalComponent provides this@createJewelComposePanel, content = content) + } + } + } + private fun createJewelComposePanel(config: ComposePanel.(JPanel) -> Unit): JPanel { val jewelPanel = JPanel() jewelPanel.layout = BorderLayout()