From 4f8b593a8608d6a3a9c4fb7f13873ea950b3abfb Mon Sep 17 00:00:00 2001 From: weisj Date: Sat, 4 Apr 2020 11:37:54 +0200 Subject: [PATCH] Install correct action map for toolbars. --- .../github/weisj/darklaf/ui/toolbar/DarkToolBarUIBridge.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/toolbar/DarkToolBarUIBridge.java b/core/src/main/java/com/github/weisj/darklaf/ui/toolbar/DarkToolBarUIBridge.java index 45771827..49adff4f 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/toolbar/DarkToolBarUIBridge.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/toolbar/DarkToolBarUIBridge.java @@ -37,7 +37,6 @@ import javax.swing.event.MouseInputListener; import javax.swing.plaf.ToolBarUI; import javax.swing.plaf.UIResource; import javax.swing.plaf.basic.BasicBorders; -import javax.swing.plaf.basic.BasicToolBarUI; import java.awt.*; import java.awt.event.*; import java.beans.PropertyChangeEvent; @@ -409,10 +408,8 @@ public abstract class DarkToolBarUIBridge extends ToolBarUI implements SwingCons */ protected void installKeyboardActions() { InputMap km = getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); - SwingUtilities.replaceUIInputMap(toolBar, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, km); - - LazyActionMap.installLazyActionMap(toolBar, BasicToolBarUI.class, "ToolBar.actionMap"); + LazyActionMap.installLazyActionMap(toolBar, DarkToolBarUIBridge.class, "ToolBar.actionMap"); } /**