From 05eee4e01ced0e47d017711a0ad2104f83c24c90 Mon Sep 17 00:00:00 2001 From: weisj Date: Wed, 18 Mar 2020 14:49:41 +0100 Subject: [PATCH] Added SplitPane.dividerSize property. --- .../weisj/darklaf/properties/ui/splitPane.properties | 5 +++-- .../java/com/github/weisj/darklaf/PropertyLoader.java | 10 +++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/core/src/main/resources/com/github/weisj/darklaf/properties/ui/splitPane.properties b/core/src/main/resources/com/github/weisj/darklaf/properties/ui/splitPane.properties index f6bbda7a..53520c53 100644 --- a/core/src/main/resources/com/github/weisj/darklaf/properties/ui/splitPane.properties +++ b/core/src/main/resources/com/github/weisj/darklaf/properties/ui/splitPane.properties @@ -30,11 +30,12 @@ SplitPane.dividerLineColor = %borderSecondary SplitPane.dividerFocusColor = null SplitPane.centerOneTouchButtons = true SplitPane.defaultDividerStyle = grip +SplitPane.dividerSize = 10 #Icons SplitPane.horizontalGlue.icon = navigation/horizontalGlue.svg[themed](4,13) SplitPane.verticalGlue.icon = navigation/verticalGlue.svg[themed](13,4) -SplitPaneDivider.leftOneTouch.icon = navigation/arrowLeft.svg[themed] -SplitPaneDivider.rightOneTouch.icon = navigation/arrowRight.svg[themed] +SplitPaneDivider.leftOneTouch.icon = navigation/arrowLeft.svg[themed](13,13) +SplitPaneDivider.rightOneTouch.icon = navigation/arrowRight.svg[themed](13,13) SplitPaneDivider.topOneTouch.icon = navigation/arrowUp.svg[themed](13,13) SplitPaneDivider.bottomOneTouch.icon = navigation/arrowDown.svg[themed](13,13) diff --git a/property-loader/src/main/java/com/github/weisj/darklaf/PropertyLoader.java b/property-loader/src/main/java/com/github/weisj/darklaf/PropertyLoader.java index fa357dad..af5ea820 100644 --- a/property-loader/src/main/java/com/github/weisj/darklaf/PropertyLoader.java +++ b/property-loader/src/main/java/com/github/weisj/darklaf/PropertyLoader.java @@ -301,9 +301,13 @@ public final class PropertyLoader { } - private static DimensionUIResource parseSize(final String value) { - int[] dim = Arrays.stream(value.split(",", 2)).mapToInt(Integer::parseInt).toArray(); - return new DimensionUIResource(dim[0], dim[1]); + private static Object parseSize(final String value) { + try { + int[] dim = Arrays.stream(value.split(",", 2)).mapToInt(Integer::parseInt).toArray(); + return new DimensionUIResource(dim[0], dim[1]); + } catch (IndexOutOfBoundsException | NumberFormatException e) { + return new LoadError(); + } }