Skip to content

Commit f0fc40c

Browse files
committed
using better tick element from tabulator
1 parent d61715e commit f0fc40c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lldb/tools/lldb-dap/src-ts/webview/symbols-table-view.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import type { CellComponent, ColumnDefinition } from "tabulator-tables";
22
import type { SymbolType } from ".."
33

4+
/// SVG from https://github.com/olifolkerd/tabulator/blob/master/src/js/modules/Format/defaults/formatters/tickCross.js
5+
/// but with the default font color.
6+
/// hopefully in the future we can set the color as parameter: https://github.com/olifolkerd/tabulator/pull/4791
7+
const TICK_ELEMENT = `<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="var(--vscode-editor-foreground)" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>`;
8+
49
function getTabulatorHexaFormatter(padding: number): (cell: CellComponent) => string {
510
return (cell: CellComponent) => {
611
const val = cell.getValue();
@@ -34,7 +39,7 @@ const SYMBOL_TABLE_COLUMNS: ColumnDefinition[] = [
3439
widthGrow: 0.8,
3540
formatter: "tickCross",
3641
formatterParams: {
37-
tickElement: "✔",
42+
tickElement: TICK_ELEMENT,
3843
crossElement: false,
3944
}
4045
},
@@ -46,7 +51,7 @@ const SYMBOL_TABLE_COLUMNS: ColumnDefinition[] = [
4651
widthGrow: 0.8,
4752
formatter: "tickCross",
4853
formatterParams: {
49-
tickElement: "✔",
54+
tickElement: TICK_ELEMENT,
5055
crossElement: false,
5156
}
5257
},
@@ -58,7 +63,7 @@ const SYMBOL_TABLE_COLUMNS: ColumnDefinition[] = [
5863
widthGrow: 0.8,
5964
formatter: "tickCross",
6065
formatterParams: {
61-
tickElement: "✔",
66+
tickElement: TICK_ELEMENT,
6267
crossElement: false,
6368
}
6469
},

0 commit comments

Comments
 (0)