Commit 59290e12 authored by Matan Ziv-Av's avatar Matan Ziv-Av Committed by Kurt Hindenburg
Browse files

Add a new rendition flag RE_TRANSPARENT

This flag is used for cells where the background is not drawn
unlike RE_CONCEAL, which draws background, but not foreground.

This flag is used for cells where an unmanaged image is placed.
parent cabe292e
Pipeline #193499 passed with stage
in 2 minutes and 12 seconds
......@@ -243,7 +243,7 @@ void Screen::eraseBlock(int y, int x, int height, int width)
width = qBound(0, width, _columns - x - 1);
int endCol = x + width;
height = qBound(0, height, _lines - y - 1);
Character chr(' ', CharacterColor(COLOR_SPACE_DEFAULT, DEFAULT_FORE_COLOR), CharacterColor(COLOR_SPACE_DEFAULT, DEFAULT_BACK_COLOR), RE_CONCEAL, false);
Character chr(' ', CharacterColor(COLOR_SPACE_DEFAULT, DEFAULT_FORE_COLOR), CharacterColor(COLOR_SPACE_DEFAULT, DEFAULT_BACK_COLOR), RE_TRANSPARENT, false);
for (int row = y; row < y + height; row++) {
QVector<Character> &line = _screenLines[row];
if (line.size() < endCol + 1) {
......
......@@ -45,6 +45,8 @@ const RenditionFlags RE_STRIKEOUT = (1 << 8);
const RenditionFlags RE_CONCEAL = (1 << 9);
const RenditionFlags RE_OVERLINE = (1 << 10);
const RenditionFlags RE_SELECTED = (1 << 11);
const RenditionFlags RE_TRANSPARENT = (1 << 12);
/* clang-format on */
/**
......
......@@ -470,7 +470,7 @@ void TerminalPainter::drawTextFragment(QPainter &painter,
}
bool drawBG = backgroundColor != colorTable[DEFAULT_BACK_COLOR];
if (screen->hasGraphics() && style.rendition == RE_CONCEAL) {
if (screen->hasGraphics() && style.rendition == RE_TRANSPARENT) {
drawBG = false;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment