Text color and vertical padding option to Quote span.
Border thickness, border color, corner radius, vertical padding and text size options to Preformat span.
Details of changes:
AztecQuoteSpan span was extending QuoteSpan but was not utilizing anything Quote specific from the superclass. We already doing all the work ourself utilizing LeadingMarginSpan and LineBackgroundSpan. Because of this I switched from extending QuoteSpan with CharacterStyle to affect the text color.
AztecPreformatSpan - added bunch of styling options, and changed how we draw background - from simple rect drawing to path drawing. This was necessary since path drawing provides extra flexibility that allows us to draw border and fill depending on which line in the block is being rendered (top, middle or bottom).
Removed content of drawLeadingMargin from AztecPreformatSpan since it did nothing useful.
For both spans - fixed the issue where vertical padding was inconsistently applied to wrapping and new lines within same block (see quote screenshot)
Before
After
Test
Modify quoteTextColor in styles.xml and make sure the value is used to render text of the Quote.
Modify preformatBorderColor, preformatBorderRadius, preformatBorderThickness, preformat_leading_margin and preformatTextSize and confirm that style of preformed code changes accordingly.
This PR adds:
Details of changes:
AztecQuoteSpan
span was extendingQuoteSpan
but was not utilizing anything Quote specific from the superclass. We already doing all the work ourself utilizingLeadingMarginSpan
andLineBackgroundSpan
. Because of this I switched from extendingQuoteSpan
withCharacterStyle
to affect the text color.AztecPreformatSpan
- added bunch of styling options, and changed how we draw background - from simple rect drawing to path drawing. This was necessary since path drawing provides extra flexibility that allows us to draw border and fill depending on which line in the block is being rendered (top, middle or bottom).Removed content of
drawLeadingMargin
fromAztecPreformatSpan
since it did nothing useful.For both spans - fixed the issue where vertical padding was inconsistently applied to wrapping and new lines within same block (see quote screenshot)
Test
quoteTextColor
instyles.xml
and make sure the value is used to render text of the Quote.preformatBorderColor
,preformatBorderRadius
,preformatBorderThickness
,preformat_leading_margin
andpreformatTextSize
and confirm that style of preformed code changes accordingly.