Browse Source

RootPane: Combine all border keys into one

They were all the same anyway.
jnf_util_static
Jannis Weis 3 years ago
parent
commit
ef54362467
No known key found for this signature in database
GPG Key ID: 7C9D8D4B558049AB
  1. 7
      core/src/main/java/com/github/weisj/darklaf/ui/rootpane/DarkRootPaneUI.java
  2. 9
      core/src/main/resources/com/github/weisj/darklaf/ui/rootPane.properties

7
core/src/main/java/com/github/weisj/darklaf/ui/rootpane/DarkRootPaneUI.java

@ -45,10 +45,7 @@ public class DarkRootPaneUI extends BasicRootPaneUI implements HierarchyListener
public static final String KEY_NO_DECORATIONS = KEY_PREFIX + "noDecorations";
public static final String KEY_UNIFIED_MENUBAR = KEY_PREFIX + "unifiedMenuBar";
public static final String KEY_COLORED_TITLE_BAR = KEY_PREFIX + "coloredTitleBar";
protected static final String[] borderKeys = new String[] {"RootPane.border", "RootPane.frameBorder",
"RootPane.plainDialogBorder", "RootPane.informationDialogBorder", "RootPane.errorDialogBorder",
"RootPane.colorChooserDialogBorder", "RootPane.fileChooserDialogBorder",
"RootPane.questionDialogBorder", "RootPane.warningDialogBorder"};
protected static final String[] borderKeys = new String[] {"RootPane.border", "RootPane.frameBorder"};
private Window window;
private CustomTitlePane titlePane;
@ -82,7 +79,7 @@ public class DarkRootPaneUI extends BasicRootPaneUI implements HierarchyListener
protected void installBorder(final JRootPane root) {
if (root == null) return;
LookAndFeel.installBorder(root, borderKeys[windowDecorationsStyle]);
LookAndFeel.installBorder(root, borderKeys[Math.min(1, windowDecorationsStyle)]);
}
@Override

9
core/src/main/resources/com/github/weisj/darklaf/ui/rootPane.properties

@ -1,6 +1,6 @@
# MIT License
#
# Copyright (c) 2019-2021 Jannis Weis
# Copyright (c) 2019-2022 Jannis Weis
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@ -28,10 +28,3 @@ RootPane.borderInsets = 0,0,0,0
RootPane.borderColor = %border
RootPane.border = com.github.weisj.darklaf.ui.rootpane.PlainRootPaneBorder
RootPane.frameBorder = com.github.weisj.darklaf.ui.rootpane.DarkRootPaneBorder
RootPane.informationDialogBorder = com.github.weisj.darklaf.ui.rootpane.DarkRootPaneBorder
RootPane.plainDialogBorder = com.github.weisj.darklaf.ui.rootpane.DarkRootPaneBorder
RootPane.warningDialogBorder = com.github.weisj.darklaf.ui.rootpane.DarkRootPaneBorder
RootPane.colorChooserDialogBorder = com.github.weisj.darklaf.ui.rootpane.DarkRootPaneBorder
RootPane.fileChooserDialogBorder = com.github.weisj.darklaf.ui.rootpane.DarkRootPaneBorder
RootPane.questionDialogBorder = com.github.weisj.darklaf.ui.rootpane.DarkRootPaneBorder
RootPane.errorDialogBorder = com.github.weisj.darklaf.ui.rootpane.DarkRootPaneBorder

Loading…
Cancel
Save