Fix for heading break height and thematic break height
This commit is contained in:
parent
c0c77802db
commit
59f647e5cc
@ -53,20 +53,24 @@ public class HeadingSpan extends MetricAffectingSpan implements LeadingMarginSpa
|
||||
theme.applyHeadingBreakStyle(paint);
|
||||
|
||||
final float height = paint.getStrokeWidth();
|
||||
final int b = (int) (bottom - height + .5F);
|
||||
|
||||
final int left;
|
||||
final int right;
|
||||
if (dir > 0) {
|
||||
left = x;
|
||||
right = c.getWidth();
|
||||
} else {
|
||||
left = x - c.getWidth();
|
||||
right = x;
|
||||
if (height > .0F) {
|
||||
|
||||
final int b = (int) (bottom - height + .5F);
|
||||
|
||||
final int left;
|
||||
final int right;
|
||||
if (dir > 0) {
|
||||
left = x;
|
||||
right = c.getWidth();
|
||||
} else {
|
||||
left = x - c.getWidth();
|
||||
right = x;
|
||||
}
|
||||
|
||||
rect.set(left, b, right, bottom);
|
||||
c.drawRect(rect, paint);
|
||||
}
|
||||
|
||||
rect.set(left, b, right, bottom);
|
||||
c.drawRect(rect, paint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -336,7 +336,7 @@ public class SpannableTheme {
|
||||
}
|
||||
paint.setColor(color);
|
||||
paint.setStyle(Paint.Style.FILL);
|
||||
if (headingBreakHeight != 0) {
|
||||
if (headingBreakHeight >= 0) {
|
||||
//noinspection SuspiciousNameCombination
|
||||
paint.setStrokeWidth(headingBreakHeight);
|
||||
}
|
||||
@ -374,7 +374,7 @@ public class SpannableTheme {
|
||||
paint.setColor(color);
|
||||
paint.setStyle(Paint.Style.FILL);
|
||||
|
||||
if (thematicBreakHeight != 0) {
|
||||
if (thematicBreakHeight >= 0) {
|
||||
//noinspection SuspiciousNameCombination
|
||||
paint.setStrokeWidth(thematicBreakHeight);
|
||||
}
|
||||
@ -435,11 +435,11 @@ public class SpannableTheme {
|
||||
private int codeMultilineMargin;
|
||||
private Typeface codeTypeface;
|
||||
private int codeTextSize;
|
||||
private int headingBreakHeight;
|
||||
private int headingBreakHeight = -1;
|
||||
private int headingBreakColor;
|
||||
private float scriptTextSizeRatio;
|
||||
private int thematicBreakColor;
|
||||
private int thematicBreakHeight;
|
||||
private int thematicBreakHeight = -1;
|
||||
private int tableCellPadding;
|
||||
private int tableBorderColor;
|
||||
private int tableBorderWidth;
|
||||
|
Loading…
x
Reference in New Issue
Block a user