Skip to content

Ghidra is a software reverse engineering (SRE) framework

GT-3103 - Look and Feel - fixed Linux Nimbus LaF issues with painting in some support tools

dragonmacherb6765e539d84
diff --git a/Ghidra/Framework/Docking/src/main/java/ghidra/docking/util/DockingWindowsLookAndFeelUtils.java b/Ghidra/Framework/Docking/src/main/java/ghidra/docking/util/DockingWindowsLookAndFeelUtils.java
index ae117c2628..d340e094c0 100644
--- a/Ghidra/Framework/Docking/src/main/java/ghidra/docking/util/DockingWindowsLookAndFeelUtils.java
+++ b/Ghidra/Framework/Docking/src/main/java/ghidra/docking/util/DockingWindowsLookAndFeelUtils.java
@@ -338,6 +338,7 @@ public class DockingWindowsLookAndFeelUtils {
/**
* Returns true if the given UI object is using the Aqua Look and Feel.
* @param UI the UI to examine.
+ * @return true if the UI is using Aqua
*/
public static boolean isUsingAquaUI(ComponentUI UI) {
Class<? extends ComponentUI> clazz = UI.getClass();
@@ -345,4 +346,12 @@ public class DockingWindowsLookAndFeelUtils {
return name.startsWith("Aqua");
}
+ /**
+ * Returns true if 'Nimbus' is the current Look and Feel
+ * @return true if 'Nimbus' is the current Look and Feel
+ */
+ public static boolean isUsingNimbusUI() {
+ LookAndFeel lookAndFeel = UIManager.getLookAndFeel();
+ return NIMBUS_LOOK_AND_FEEL.equals(lookAndFeel.getName());
+ }
}