From ffcec5e32f29e369d58496ee4ae3edb6bcbdfdf0 Mon Sep 17 00:00:00 2001 From: Sebastiano Poggi Date: Wed, 6 Sep 2023 16:19:29 +0200 Subject: [PATCH] Fix broken build --- .../main/kotlin/org/jetbrains/jewel/bridge/BridgeUtils.kt | 4 ++++ .../jewel/bridge/IntelliJResourcePainterProvider.kt | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/BridgeUtils.kt b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/BridgeUtils.kt index fbaf2d7e4..e6ee32764 100644 --- a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/BridgeUtils.kt +++ b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/BridgeUtils.kt @@ -159,8 +159,12 @@ internal fun retrieveIcon( baseIconPath: String, iconData: IntelliJThemeIconData, svgLoader: SvgLoader, + prefixTokensProvider: (state: T) -> String = { "" }, + suffixTokensProvider: (state: T) -> String = { "" }, ): PainterProvider = IntelliJResourcePainterProvider.stateful( basePath = iconData.iconOverrides[baseIconPath] ?: baseIconPath, svgLoader, + prefixTokensProvider, + suffixTokensProvider, ) diff --git a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/IntelliJResourcePainterProvider.kt b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/IntelliJResourcePainterProvider.kt index 75a387d4b..671328835 100644 --- a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/IntelliJResourcePainterProvider.kt +++ b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/IntelliJResourcePainterProvider.kt @@ -32,7 +32,12 @@ class IntelliJResourcePainterProvider @InternalJewelApi constructor( fun stateful( basePath: String, svgLoader: SvgLoader, - pathPatcher: ResourcePathPatcher = StatefulResourcePathPatcher(), + prefixTokensProvider: (state: T) -> String = { "" }, + suffixTokensProvider: (state: T) -> String = { "" }, + pathPatcher: ResourcePathPatcher = StatefulResourcePathPatcher( + prefixTokensProvider, + suffixTokensProvider, + ), ) = IntelliJResourcePainterProvider(basePath, svgLoader, pathPatcher, IntelliJIconMapper) }