X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fbackend%2FLogicalScreen.java;h=4e4aecca7a349eb999b83a9ef4bc71c229ff650a;hb=3fe82fa71d39d874691dc85e6a77250fd4953b17;hp=b4e6214177ecb4a2fb7036b1bdab7bec8e95954e;hpb=772b8255e4ee92c9c026bd94df39d0c177d6a6bb;p=fanfix.git diff --git a/src/jexer/backend/LogicalScreen.java b/src/jexer/backend/LogicalScreen.java index b4e6214..4e4aecc 100644 --- a/src/jexer/backend/LogicalScreen.java +++ b/src/jexer/backend/LogicalScreen.java @@ -803,11 +803,30 @@ public class LogicalScreen implements Screen { clipBottom = height - offsetY; for (int i = 0; i < boxHeight; i++) { - putAttrXY(boxLeft + boxWidth, boxTop + 1 + i, shadowAttr); - putAttrXY(boxLeft + boxWidth + 1, boxTop + 1 + i, shadowAttr); + Cell cell = getCharXY(offsetX + boxLeft + boxWidth, + offsetY + boxTop + 1 + i); + if (cell.getWidth() == Cell.Width.SINGLE) { + putAttrXY(boxLeft + boxWidth, boxTop + 1 + i, shadowAttr); + } else { + putCharXY(boxLeft + boxWidth, boxTop + 1 + i, ' ', shadowAttr); + } + cell = getCharXY(offsetX + boxLeft + boxWidth + 1, + offsetY + boxTop + 1 + i); + if (cell.getWidth() == Cell.Width.SINGLE) { + putAttrXY(boxLeft + boxWidth + 1, boxTop + 1 + i, shadowAttr); + } else { + putCharXY(boxLeft + boxWidth + 1, boxTop + 1 + i, ' ', + shadowAttr); + } } for (int i = 0; i < boxWidth; i++) { - putAttrXY(boxLeft + 2 + i, boxTop + boxHeight, shadowAttr); + Cell cell = getCharXY(offsetX + boxLeft + 2 + i, + offsetY + boxTop + boxHeight); + if (cell.getWidth() == Cell.Width.SINGLE) { + putAttrXY(boxLeft + 2 + i, boxTop + boxHeight, shadowAttr); + } else { + putCharXY(boxLeft + 2 + i, boxTop + boxHeight, ' ', shadowAttr); + } } clipRight = oldClipRight; clipBottom = oldClipBottom; @@ -985,15 +1004,11 @@ public class LogicalScreen implements Screen { Cell left = new Cell(cell); left.setImage(leftImage); left.setWidth(Cell.Width.LEFT); - // Blank out the char itself, so that shadows do not leave artifacts. - left.setChar(' '); putCharXY(x, y, left); Cell right = new Cell(cell); right.setImage(rightImage); right.setWidth(Cell.Width.RIGHT); - // Blank out the char itself, so that shadows do not leave artifacts. - right.setChar(' '); putCharXY(x + 1, y, right); }