From 43dfd951dcc727074b9b9e9140e27de0dac7eb81 Mon Sep 17 00:00:00 2001 From: weisj Date: Fri, 20 Mar 2020 20:10:09 +0100 Subject: [PATCH] Added improved focus border to filechooser buttons. --- .../weisj/darklaf/ui/filechooser/DarkFileChooserUI.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserUI.java b/core/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserUI.java index 3397f01b..eccc0e84 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserUI.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserUI.java @@ -258,6 +258,8 @@ public class DarkFileChooserUI extends DarkFileChooserUIBridge { Box box = Box.createHorizontalBox(); listViewButton = createListViewButton(); detailsViewButton = createDetailsViewButton(); + listViewButton.putClientProperty(DarkButtonUI.KEY_RIGHT_NEIGHBOUR, detailsViewButton); + detailsViewButton.putClientProperty(DarkButtonUI.KEY_LEFT_NEIGHBOUR, listViewButton); box.add(listViewButton); box.add(detailsViewButton); @@ -292,12 +294,7 @@ public class DarkFileChooserUI extends DarkFileChooserUIBridge { } protected JToggleButton createDetailsViewButton() { - JToggleButton button = new TooltipAwareToggleButton(detailsViewIcon) { - @Override - public boolean isFocusable() { - return super.isFocusable(); - } - }; + JToggleButton button = new TooltipAwareToggleButton(detailsViewIcon); setupButton(button, detailsViewButtonAccessibleName, detailsViewButtonToolTipText); Icon selectedDetailsViewIcon = UIManager.getIcon("FileChooser.detailsViewSelectedIcon"); button.setSelectedIcon(selectedDetailsViewIcon);