From b6765e539d84debe298e6185a402eebd0d86286a Mon Sep 17 00:00:00 2001 From: dragonmacher <48328597+dragonmacher@users.noreply.github.com> Date: Mon, 26 Aug 2019 13:24:18 -0400 Subject: [PATCH] GT-3103 - Look and Feel - fixed Linux Nimbus LaF issues with painting in some support tools --- .../docking/util/DockingWindowsLookAndFeelUtils.java | 9 +++++++++ 1 file changed, 9 insertions(+) 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 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()); + } }