-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve IconKey API to include a classloader (#507)
This prevents issues when running in release-mode IDEs, where providing a classloader is mandatory to successfully load icons. The icon keys generator script has also been updated to include the class in each entry. This has been tested in standalone, in the normal IDE sample mode, and as a built plugin in a release-mode IDE.
- Loading branch information
Showing
21 changed files
with
261 additions
and
134 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
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
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
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
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
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
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
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
32 changes: 32 additions & 0 deletions
32
...src/main/kotlin/org/jetbrains/jewel/markdown/extensions/github/alerts/GitHubAlertIcons.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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package org.jetbrains.jewel.markdown.extensions.github.alerts | ||
|
||
import org.jetbrains.jewel.ui.icon.IconKey | ||
import org.jetbrains.jewel.ui.icon.PathIconKey | ||
|
||
public object GitHubAlertIcons { | ||
public val Note: IconKey = | ||
PathIconKey( | ||
path = "icons/markdown/extensions/github/alerts/alert-note.svg", | ||
iconClass = GitHubAlertIcons::class.java, | ||
) | ||
public val Tip: IconKey = | ||
PathIconKey( | ||
path = "icons/markdown/extensions/github/alerts/alert-tip.svg", | ||
iconClass = GitHubAlertIcons::class.java, | ||
) | ||
public val Important: IconKey = | ||
PathIconKey( | ||
path = "icons/markdown/extensions/github/alerts/alert-important.svg", | ||
iconClass = GitHubAlertIcons::class.java, | ||
) | ||
public val Warning: IconKey = | ||
PathIconKey( | ||
path = "icons/markdown/extensions/github/alerts/alert-warning.svg", | ||
iconClass = GitHubAlertIcons::class.java, | ||
) | ||
public val Caution: IconKey = | ||
PathIconKey( | ||
path = "icons/markdown/extensions/github/alerts/alert-caution.svg", | ||
iconClass = GitHubAlertIcons::class.java, | ||
) | ||
} |
Oops, something went wrong.