IntelliJ Themes Pack: use absolute resource location for loading themes (PR #88, issue #89)

This commit is contained in:
Karl Tauber
2020-04-27 16:28:38 +02:00
parent 08ba7dd065
commit 129bc9b3ae
3 changed files with 6 additions and 2 deletions

View File

@@ -9,6 +9,8 @@ FlatLaf Change Log
- IntelliJ Themes: Fixed ComboBox size and Spinner border in all Material UI
Lite themes and limit tree row height in all Material UI Lite themes and some
other themes.
- IntelliJ Themes: Material UI Lite themes did not work when using
[IntelliJ Themes Pack](flatlaf-intellij-themes) addon. (PR #88, issue #89)
## 0.32

View File

@@ -32,7 +32,8 @@ class Utils
static IntelliJTheme loadTheme( String name ) {
try {
return new IntelliJTheme( Utils.class.getResourceAsStream( "themes/" + name ) );
return new IntelliJTheme( Utils.class.getResourceAsStream(
"/com/formdev/flatlaf/intellijthemes/themes/" + name ) );
} catch( ParseException | IOException ex ) {
String msg = "FlatLaf: Failed to load IntelliJ theme '" + name + "'";
LOG.log( Level.SEVERE, msg, ex );

View File

@@ -32,7 +32,8 @@ class Utils
static IntelliJTheme loadTheme( String name ) {
try {
return new IntelliJTheme( Utils.class.getResourceAsStream( "themes/material-theme-ui-lite/" + name ) );
return new IntelliJTheme( Utils.class.getResourceAsStream(
"/com/formdev/flatlaf/intellijthemes/themes/material-theme-ui-lite/" + name ) );
} catch( ParseException | IOException ex ) {
String msg = "FlatLaf: Failed to load IntelliJ theme '" + name + "'";
LOG.log( Level.SEVERE, msg, ex );