DOM renderer underline style
This commit is contained in:
+5
-3
@@ -163,9 +163,11 @@
|
|||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.xterm-underline {
|
.xterm-underline-1 { text-decoration: underline; }
|
||||||
text-decoration: underline;
|
.xterm-underline-2 { text-decoration: double underline; }
|
||||||
}
|
.xterm-underline-3 { text-decoration: wavy underline; }
|
||||||
|
.xterm-underline-4 { text-decoration: dotted underline; }
|
||||||
|
.xterm-underline-5 { text-decoration: dashed underline; }
|
||||||
|
|
||||||
.xterm-strikethrough {
|
.xterm-strikethrough {
|
||||||
text-decoration: line-through;
|
text-decoration: line-through;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import { IBufferLine, ICellData, IColor } from 'common/Types';
|
import { IBufferLine, ICellData, IColor } from 'common/Types';
|
||||||
import { INVERTED_DEFAULT_COLOR } from 'browser/renderer/atlas/Constants';
|
import { INVERTED_DEFAULT_COLOR } from 'browser/renderer/atlas/Constants';
|
||||||
import { NULL_CELL_CODE, WHITESPACE_CELL_CHAR, Attributes } from 'common/buffer/Constants';
|
import { NULL_CELL_CODE, WHITESPACE_CELL_CHAR, Attributes, UnderlineStyle } from 'common/buffer/Constants';
|
||||||
import { CellData } from 'common/buffer/CellData';
|
import { CellData } from 'common/buffer/CellData';
|
||||||
import { IBufferService, ICoreService, IDecorationService, IOptionsService } from 'common/services/Services';
|
import { IBufferService, ICoreService, IDecorationService, IOptionsService } from 'common/services/Services';
|
||||||
import { color, rgba } from 'common/Color';
|
import { color, rgba } from 'common/Color';
|
||||||
@@ -155,16 +155,19 @@ export class DomRendererRowFactory {
|
|||||||
charElement.classList.add(DIM_CLASS);
|
charElement.classList.add(DIM_CLASS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cell.isUnderline()) {
|
|
||||||
charElement.classList.add(UNDERLINE_CLASS);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cell.isInvisible()) {
|
if (cell.isInvisible()) {
|
||||||
charElement.textContent = WHITESPACE_CELL_CHAR;
|
charElement.textContent = WHITESPACE_CELL_CHAR;
|
||||||
} else {
|
} else {
|
||||||
charElement.textContent = cell.getChars() || WHITESPACE_CELL_CHAR;
|
charElement.textContent = cell.getChars() || WHITESPACE_CELL_CHAR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cell.isUnderline()) {
|
||||||
|
charElement.classList.add(`${UNDERLINE_CLASS}-${cell.extended.underlineStyle}`);
|
||||||
|
if (charElement.textContent === ' ') {
|
||||||
|
charElement.innerHTML = ' ';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (cell.isStrikethrough()) {
|
if (cell.isStrikethrough()) {
|
||||||
charElement.classList.add(STRIKETHROUGH_CLASS);
|
charElement.classList.add(STRIKETHROUGH_CLASS);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user