From 9d393433b58eeb1fab6ea8b0c5443592f593ba51 Mon Sep 17 00:00:00 2001 From: kutoman Date: Mon, 18 Mar 2019 11:27:25 +0100 Subject: [PATCH] Update RoundRectBorder.java fixed: bottomOnlyMode, topOnlyMode causing the opposite effect --- CodenameOne/src/com/codename1/ui/plaf/RoundRectBorder.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CodenameOne/src/com/codename1/ui/plaf/RoundRectBorder.java b/CodenameOne/src/com/codename1/ui/plaf/RoundRectBorder.java index 0cbcdca813..caa3a13f4d 100644 --- a/CodenameOne/src/com/codename1/ui/plaf/RoundRectBorder.java +++ b/CodenameOne/src/com/codename1/ui/plaf/RoundRectBorder.java @@ -83,7 +83,8 @@ public class RoundRectBorder extends Border { private int shadowOpacity = 0; /** - * X axis bias of the shadow between 0 and 1 where 0 is to the top and 1 is to the bottom, defaults to 0.5 + * X axis bias of the shadow between 0 and 1 where 0 is to the + and 1 is to the bottom, defaults to 0.5 */ private float shadowX = 0.5f; @@ -314,7 +315,7 @@ public RoundRectBorder bottomRightMode(boolean bottomRight) { * @return border instance so these calls can be chained */ public RoundRectBorder topOnlyMode(boolean topOnlyMode) { - if(topOnlyMode) { + if(!topOnlyMode) { this.topLeft = false; this.topRight = false; this.bottomLeft = true; @@ -333,7 +334,7 @@ public RoundRectBorder topOnlyMode(boolean topOnlyMode) { * @return border instance so these calls can be chained */ public RoundRectBorder bottomOnlyMode(boolean bottomOnlyMode) { - if(bottomOnlyMode) { + if(!bottomOnlyMode) { this.topLeft = true; this.topRight = true; this.bottomLeft = false;