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

@@ -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 );