Remove background highlighting from empty lines in image editor.
Co-Authored-By: GitStart <1501599+gitstart@users.noreply.github.com> Fixes #12612
This commit is contained in:
parent
dfb913cb98
commit
2200af9c31
1 changed files with 8 additions and 4 deletions
|
@ -320,10 +320,14 @@ public final class MultiLineTextRenderer extends InvalidateableRenderer implemen
|
|||
rendererContext.canvasMatrix.concat(projectionMatrix);
|
||||
|
||||
if (mode == Mode.HIGHLIGHT) {
|
||||
modeBounds.set(textBounds.left - HIGHLIGHT_HORIZONTAL_PADDING,
|
||||
selectionBounds.top - HIGHLIGHT_TOP_PADDING,
|
||||
textBounds.right + HIGHLIGHT_HORIZONTAL_PADDING,
|
||||
selectionBounds.bottom + HIGHLIGHT_BOTTOM_PADDING);
|
||||
if(text.isEmpty()){
|
||||
modeBounds.setEmpty();
|
||||
}else{
|
||||
modeBounds.set(textBounds.left - HIGHLIGHT_HORIZONTAL_PADDING,
|
||||
selectionBounds.top - HIGHLIGHT_TOP_PADDING,
|
||||
textBounds.right + HIGHLIGHT_HORIZONTAL_PADDING,
|
||||
selectionBounds.bottom + HIGHLIGHT_BOTTOM_PADDING);
|
||||
}
|
||||
int alpha = modePaint.getAlpha();
|
||||
modePaint.setAlpha(rendererContext.getAlpha(alpha));
|
||||
rendererContext.canvas.drawRoundRect(modeBounds, HIGHLIGHT_CORNER_RADIUS, HIGHLIGHT_CORNER_RADIUS, modePaint);
|
||||
|
|
Loading…
Add table
Reference in a new issue