-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Replace icon paths with keys * Clean up lint warnings
- Loading branch information
Showing
30 changed files
with
214 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 15 additions & 1 deletion
16
ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/BridgeResourceResolver.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,25 @@ | ||
package org.jetbrains.jewel.bridge | ||
|
||
import com.intellij.util.ui.DirProvider | ||
import org.jetbrains.jewel.ui.icon.IconKey | ||
import org.jetbrains.jewel.ui.painter.ResourcePainterProvider | ||
|
||
/** | ||
* [ResourcePainterProvider] to resolve resource in Intellij Module and | ||
* [ResourcePainterProvider] to resolve resources in Intellij Module and | ||
* Bridge module. | ||
*/ | ||
public fun bridgePainterProvider(path: String): ResourcePainterProvider = | ||
ResourcePainterProvider(path, DirProvider::class.java.classLoader, SwingBridgeService::class.java.classLoader) | ||
|
||
/** | ||
* [ResourcePainterProvider] to resolve resources in Intellij Module and | ||
* Bridge module. | ||
*/ | ||
public fun bridgePainterProvider(iconKey: IconKey): ResourcePainterProvider { | ||
val isNewUi = isNewUiTheme() | ||
return ResourcePainterProvider( | ||
iconKey.path(isNewUi), | ||
DirProvider::class.java.classLoader, | ||
SwingBridgeService::class.java.classLoader, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.