File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
src/main/java/com/coreyd97/burpcustomizer Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ public void registerExtenderCallbacks(IBurpExtenderCallbacks callbacks) {
4343 originalBurpTheme = UIManager .getLookAndFeel ();
4444
4545 String sourceEnum = callbacks .loadExtensionSetting ("source" );
46- if (sourceEnum .equalsIgnoreCase ("" )){
46+ if (sourceEnum == null || sourceEnum .equalsIgnoreCase ("" )){
4747 themeSource = ThemeSource .BUILTIN ;
4848 }else {
4949 themeSource = ThemeSource .valueOf (sourceEnum );
@@ -55,7 +55,7 @@ public void registerExtenderCallbacks(IBurpExtenderCallbacks callbacks) {
5555 if (previousTheme .isPresent ()) selectedBuiltIn = previousTheme .get ();
5656
5757 String themeFilePref = callbacks .loadExtensionSetting ("themeFile" );
58- if (!themeFilePref .equalsIgnoreCase ("" )){
58+ if (themeFilePref != null && !themeFilePref .equalsIgnoreCase ("" )){
5959 selectedThemeFile = new File (themeFilePref );
6060 if (!selectedThemeFile .exists ()) selectedThemeFile = null ;
6161 }
Original file line number Diff line number Diff line change 88
99public class CustomTheme extends IntelliJTheme .ThemeLaf {
1010
11- Class burpDark , burpLight ;
11+ Class burpLaf , burpDark , burpLight ;
1212
1313 public CustomTheme (IntelliJTheme .ThemeLaf base ) {
1414 super (base .getTheme ());
1515 try {
16+ this .burpLaf = ClassLoader .getSystemClassLoader ().loadClass ("burp.theme.BurpLaf" );
1617 this .burpDark = ClassLoader .getSystemClassLoader ().loadClass ("burp.theme.BurpDarkLaf" );
1718 this .burpLight = ClassLoader .getSystemClassLoader ().loadClass ("burp.theme.BurpLightLaf" );
1819 }catch (Exception e ){
@@ -37,12 +38,14 @@ public UIDefaults getDefaults() {
3738 defaults = super .getDefaults ();
3839 BurpCustomizer .callbacks .printError ("Could not get Burp base theme! - " + e .getMessage ());
3940 }
40- // defaults = super.getDefaults(); //Debugging. Uncomment to overwrite all Burp defaults.
41- defaults .putAll (super .getDefaults ());
41+
42+ UIDefaults superDefaults = super .getDefaults ();
43+ superDefaults .remove ("SplitPaneUI" ); //Do not remove Burp's UI delegates.
44+ superDefaults .remove ("TabbedPaneUI" );
45+ defaults .putAll (superDefaults );
4246
4347 //For some reason, using lazy loading in getAdditionalDefaults for this property causes issues...
4448 defaults .put ("TabbedPane.selectedBackground" , defaults .get ("TabbedPane.background" ));
45-
4649 return defaults ;
4750 }
4851
You can’t perform that action at this time.
0 commit comments