Theme block quote color

This commit is contained in:
M66B
2021-07-05 06:53:21 +02:00
parent 79c0c8fffe
commit 6e07657557
6 changed files with 19 additions and 9 deletions

View File

@@ -489,6 +489,7 @@ public class StyleHelper {
Context context = etBody.getContext();
int colorPrimary = Helper.resolveColor(context, R.attr.colorPrimary);
final int colorBlockquote = Helper.resolveColor(context, R.attr.colorBlockquote, colorPrimary);
int quoteGap = context.getResources().getDimensionPixelSize(R.dimen.quote_gap_size);
int quoteStripe = context.getResources().getDimensionPixelSize(R.dimen.quote_stripe_width);
@@ -521,9 +522,9 @@ public class StyleHelper {
if (!has) {
QuoteSpan q;
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P)
q = new QuoteSpan(colorPrimary);
q = new QuoteSpan(colorBlockquote);
else
q = new QuoteSpan(colorPrimary, quoteStripe, quoteGap);
q = new QuoteSpan(colorBlockquote, quoteStripe, quoteGap);
edit.setSpan(q, paragraph.first, paragraph.second, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
}