From ef54362467a0cac2a98d2185e744027b98a3feed Mon Sep 17 00:00:00 2001 From: Jannis Weis <31143295+weisJ@users.noreply.github.com> Date: Wed, 2 Feb 2022 20:32:59 +0100 Subject: [PATCH] RootPane: Combine all border keys into one They were all the same anyway. --- .../github/weisj/darklaf/ui/rootpane/DarkRootPaneUI.java | 7 ++----- .../com/github/weisj/darklaf/ui/rootPane.properties | 9 +-------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/rootpane/DarkRootPaneUI.java b/core/src/main/java/com/github/weisj/darklaf/ui/rootpane/DarkRootPaneUI.java index 717b6b93..f8b17c22 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/rootpane/DarkRootPaneUI.java +++ b/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 diff --git a/core/src/main/resources/com/github/weisj/darklaf/ui/rootPane.properties b/core/src/main/resources/com/github/weisj/darklaf/ui/rootPane.properties index ac127198..f9250eaf 100644 --- a/core/src/main/resources/com/github/weisj/darklaf/ui/rootPane.properties +++ b/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