kopia lustrzana https://github.com/ryukoposting/Signal-Android
Remove background highlighting from empty lines in image editor.
Co-Authored-By: GitStart <1501599+gitstart@users.noreply.github.com> Fixes #12612main
rodzic
dfb913cb98
commit
2200af9c31
|
@ -320,10 +320,14 @@ public final class MultiLineTextRenderer extends InvalidateableRenderer implemen
|
||||||
rendererContext.canvasMatrix.concat(projectionMatrix);
|
rendererContext.canvasMatrix.concat(projectionMatrix);
|
||||||
|
|
||||||
if (mode == Mode.HIGHLIGHT) {
|
if (mode == Mode.HIGHLIGHT) {
|
||||||
|
if(text.isEmpty()){
|
||||||
|
modeBounds.setEmpty();
|
||||||
|
}else{
|
||||||
modeBounds.set(textBounds.left - HIGHLIGHT_HORIZONTAL_PADDING,
|
modeBounds.set(textBounds.left - HIGHLIGHT_HORIZONTAL_PADDING,
|
||||||
selectionBounds.top - HIGHLIGHT_TOP_PADDING,
|
selectionBounds.top - HIGHLIGHT_TOP_PADDING,
|
||||||
textBounds.right + HIGHLIGHT_HORIZONTAL_PADDING,
|
textBounds.right + HIGHLIGHT_HORIZONTAL_PADDING,
|
||||||
selectionBounds.bottom + HIGHLIGHT_BOTTOM_PADDING);
|
selectionBounds.bottom + HIGHLIGHT_BOTTOM_PADDING);
|
||||||
|
}
|
||||||
int alpha = modePaint.getAlpha();
|
int alpha = modePaint.getAlpha();
|
||||||
modePaint.setAlpha(rendererContext.getAlpha(alpha));
|
modePaint.setAlpha(rendererContext.getAlpha(alpha));
|
||||||
rendererContext.canvas.drawRoundRect(modeBounds, HIGHLIGHT_CORNER_RADIUS, HIGHLIGHT_CORNER_RADIUS, modePaint);
|
rendererContext.canvas.drawRoundRect(modeBounds, HIGHLIGHT_CORNER_RADIUS, HIGHLIGHT_CORNER_RADIUS, modePaint);
|
||||||
|
|
Ładowanie…
Reference in New Issue