Browse Source

Added improved focus border to filechooser buttons.

pull/127/head
weisj 5 years ago
parent
commit
43dfd951dc
  1. 9
      core/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserUI.java

9
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);

Loading…
Cancel
Save