From 6f3f1ab1cb1bbc34d0911d39e40082a0f6752a0a Mon Sep 17 00:00:00 2001 From: weisj Date: Tue, 31 Mar 2020 21:00:02 +0200 Subject: [PATCH] Made absolute adjustment a float value. --- .../weisj/darklaf/theme/info/FontSizeRule.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/theme/src/main/java/com/github/weisj/darklaf/theme/info/FontSizeRule.java b/theme/src/main/java/com/github/weisj/darklaf/theme/info/FontSizeRule.java index fc7c670ce..d00eacfeb 100644 --- a/theme/src/main/java/com/github/weisj/darklaf/theme/info/FontSizeRule.java +++ b/theme/src/main/java/com/github/weisj/darklaf/theme/info/FontSizeRule.java @@ -31,7 +31,7 @@ public class FontSizeRule { private final AdjustmentType type; private final FontSizePreset preset; private final float relativeAdjustment; - private final int absoluteAdjustment; + private final float absoluteAdjustment; protected FontSizeRule(final FontSizePreset preset) { this.preset = preset; @@ -41,7 +41,7 @@ protected FontSizeRule(final FontSizePreset preset) { } protected FontSizeRule(final AdjustmentType type, - final int absoluteAdjustment, final float relativeAdjustment) { + final float absoluteAdjustment, final float relativeAdjustment) { this.type = type; this.absoluteAdjustment = absoluteAdjustment; this.relativeAdjustment = relativeAdjustment; @@ -56,7 +56,7 @@ public static FontSizeRule fromPreset(final FontSizePreset preset) { return new FontSizeRule(preset); } - public static FontSizeRule absoluteAdjustment(final int adjustment) { + public static FontSizeRule absoluteAdjustment(final float adjustment) { return new FontSizeRule(AdjustmentType.ABSOLUTE_ADJUSTMENT, adjustment, 1f); } @@ -107,24 +107,24 @@ public String toString() { public enum AdjustmentType { NO_ADJUSTMENT { @Override - public float adjustSize(final float size, final int absolute, final float relative) { + public float adjustSize(final float size, final float absolute, final float relative) { return size; } }, ABSOLUTE_ADJUSTMENT { @Override - public float adjustSize(final float size, final int absolute, final float relative) { + public float adjustSize(final float size, final float absolute, final float relative) { return size + absolute; } }, RELATIVE_ADJUSTMENT { @Override - public float adjustSize(final float size, final int absolute, final float relative) { + public float adjustSize(final float size, final float absolute, final float relative) { return size * relative; } }; - abstract public float adjustSize(final float size, final int absolute, final float relative); + abstract public float adjustSize(final float size, final float absolute, final float relative); } }