Fix DrawBorder now updating color for left border, drawing it with old color

Summary: There is a small bug in DrawBorder where we forget updating color for a left border, which makes the border draw with whatever color was previously set to the Paint. This diff fixes it by updating the color.

Reviewed By: ahmedre

Differential Revision: D2779511
This commit is contained in:
Denis Koroskin 2015-12-22 11:46:59 -08:00 committed by Ahmed El-Helw
parent f6b4dc68de
commit ff77456f26
1 changed files with 1 additions and 0 deletions

View File

@ -237,6 +237,7 @@ import com.facebook.csslayout.Spacing;
float rightOfTheLeft = getLeft() + leftWidth;
int leftColor = resolveBorderColor(BORDER_LEFT_COLOR_SET, mBorderLeftColor, defaultColor);
if (Color.alpha(leftColor) != 0 && leftWidth != 0) {
PAINT.setColor(leftColor);
canvas.drawRect(getLeft(), bottomOfTheTop, rightOfTheLeft, topOfTheBottom, PAINT);
}