Browse Source

Made several buttons non-focusable.

pull/97/head
weisj 5 years ago
parent
commit
23cbdd5aa4
  1. 1
      core/src/main/java/com/github/weisj/darklaf/ui/internalframe/DarkDesktopIconUI.java
  2. 1
      core/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/MoreTabsButton.java
  3. 1
      core/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/NewTabButton.java

1
core/src/main/java/com/github/weisj/darklaf/ui/internalframe/DarkDesktopIconUI.java

@ -55,6 +55,7 @@ public class DarkDesktopIconUI extends BasicDesktopIconUI {
button = new JButtonUIResource(title, icon);
button.setOpaque(false);
button.setFocusable(false);
button.putClientProperty(DarkButtonUI.KEY_VARIANT, DarkButtonUI.VARIANT_FULL_SHADOW);
button.putClientProperty(DarkButtonUI.KEY_HOVER_COLOR, UIManager.getColor("DesktopIcon.hoverColor"));
button.putClientProperty(DarkButtonUI.KEY_CLICK_COLOR, UIManager.getColor("DesktopIcon.hoverColor"));

1
core/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/MoreTabsButton.java

@ -46,6 +46,7 @@ public class MoreTabsButton extends DarkTabAreaButton {
setIcon(EmptyIcon.create(icon.getIconWidth(), icon.getIconHeight()));
putClientProperty(DarkButtonUI.KEY_VARIANT, DarkButtonUI.VARIANT_ONLY_LABEL);
putClientProperty(DarkButtonUI.KEY_SQUARE, true);
setFocusable(false);
setFont(getFont().deriveFont(8f));
}

1
core/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/NewTabButton.java

@ -52,6 +52,7 @@ public class NewTabButton extends JPanel implements UIResource {
protected JButton createButton() {
JButton button = new JButtonUIResource();
button.setIcon(ui.getNewTabIcon());
button.setFocusable(false);
button.putClientProperty(DarkButtonUI.KEY_VARIANT, DarkButtonUI.VARIANT_SHADOW);
button.putClientProperty(DarkButtonUI.KEY_SQUARE, Boolean.TRUE);
button.putClientProperty(DarkButtonUI.KEY_ALT_ARC, Boolean.TRUE);

Loading…
Cancel
Save