Skip to content

Commit

Permalink
Merge main for 0.24.2
Browse files Browse the repository at this point in the history
# Conflicts:
#	gradle.properties
#	ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/JewelComposePanel.kt
  • Loading branch information
rock3r committed Sep 9, 2024
2 parents f0b3afc + 70a3ae3 commit 642ace1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions ide-laf-bridge/api/ide-laf-bridge.api
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 642ace1

Please sign in to comment.