From 8fe2cb412efb05cc41384c5cab8a098da3482685 Mon Sep 17 00:00:00 2001 From: Jaroslav Tulach Date: Thu, 11 Apr 2019 13:30:30 +0200 Subject: [PATCH 1/2] Only load the custom CSS when the LaF is one of the recognized ones --- .../netbeans/modules/htmlui/NbBrowsers.java | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/platform/api.htmlui/src/org/netbeans/modules/htmlui/NbBrowsers.java b/platform/api.htmlui/src/org/netbeans/modules/htmlui/NbBrowsers.java index ddf0d4922842..5aac51c5e3c9 100644 --- a/platform/api.htmlui/src/org/netbeans/modules/htmlui/NbBrowsers.java +++ b/platform/api.htmlui/src/org/netbeans/modules/htmlui/NbBrowsers.java @@ -60,29 +60,30 @@ public void run() { static void applyNbSkin() { LookAndFeel lookAndFeel = UIManager.getLookAndFeel(); - String name = lookAndFeel.getName(); + String name = findLafName(lookAndFeel.getName()); + if (name == null) { + return; + } + String resource = "nbres:/org/netbeans/modules/htmlui/css/wizard-" + name + ".css"; + loadCss(resource); + } + + private static String findLafName(String name) { switch (name) { case "Mac OS X": - name = "mac"; - break; + return "mac"; case "Metal": - name = "metal"; - break; + return "metal"; case "GTK look and feel": - name = "gtk"; - break; + return "gtk"; case "Nimbus": - name = "nimbus"; - break; + return "nimbus"; case "Windows": - name = "win"; - break; + return "win"; case "Darcula": - name = "darcula"; - break; + return "darcula"; } - final String resource = "nbres:/org/netbeans/modules/htmlui/css/wizard-" + name + ".css"; - loadCss(resource); + return null; } @JavaScriptBody(args = { "css" }, body = From d3d19fade760c11cf31238a5aa60356ea35939b9 Mon Sep 17 00:00:00 2001 From: Laszlo Kishalmi Date: Tue, 9 Apr 2019 06:38:06 -0700 Subject: [PATCH 2/2] [NETBEANS-2378] Tighten the Groovy more to the Gralde plugin --- groovy/gradle/manifest.mf | 1 + 1 file changed, 1 insertion(+) diff --git a/groovy/gradle/manifest.mf b/groovy/gradle/manifest.mf index d52926aa5998..1262924fd423 100644 --- a/groovy/gradle/manifest.mf +++ b/groovy/gradle/manifest.mf @@ -4,3 +4,4 @@ OpenIDE-Module: org.netbeans.modules.gradle OpenIDE-Module-Layer: org/netbeans/modules/gradle/layer.xml OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/gradle/Bundle.properties OpenIDE-Module-Specification-Version: 1.1 +OpenIDE-Module-Requires: cnb.org.netbeans.modules.groovy.kit \ No newline at end of file