You've already forked objdiff-web
mirror of
https://github.com/encounter/objdiff-web.git
synced 2026-07-10 12:18:37 -07:00
Style updates
This commit is contained in:
@@ -1,41 +1,26 @@
|
||||
.data-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-family: var(--vscode-editor-font-family, monospace);
|
||||
font-size: var(--vscode-editor-font-size, 13px);
|
||||
line-height: 1.5;
|
||||
font-family: var(--code-font-family);
|
||||
font-size: var(--code-font-size);
|
||||
white-space: pre;
|
||||
cursor: default;
|
||||
padding: 0 8px;
|
||||
text-wrap: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.combined-row {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.data-row:hover {
|
||||
background-color: var(--vscode-list-hoverBackground);
|
||||
.diff-any {
|
||||
background-color: rgba(255, 255, 255, 0.03);
|
||||
}
|
||||
|
||||
.address {
|
||||
color: var(--vscode-descriptionForeground);
|
||||
color: var(--line-number-foreground);
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.hex-bytes {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.separator {
|
||||
color: var(--vscode-descriptionForeground);
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
.ascii-chars {
|
||||
color: var(--vscode-foreground);
|
||||
}
|
||||
|
||||
.replace {
|
||||
color: var(--color-blue);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import styles from './DataView.module.css';
|
||||
|
||||
import clsx from 'clsx';
|
||||
import { type diff, display } from 'objdiff-wasm';
|
||||
import { memo, useCallback, useMemo } from 'react';
|
||||
import { FixedSizeList, areEqual } from 'react-window';
|
||||
@@ -55,6 +56,9 @@ const DataRow = ({
|
||||
}
|
||||
|
||||
const dataRow = display.displayDataRow(obj, symbol.info.id, row);
|
||||
const anyDiff =
|
||||
dataRow.segments.some((s) => s.kind !== 'none') ||
|
||||
dataRow.relocations.some((r) => r.kind !== 'none');
|
||||
const out: React.ReactNode[] = [];
|
||||
|
||||
// Display address
|
||||
@@ -172,25 +176,13 @@ const DataRow = ({
|
||||
}
|
||||
}
|
||||
|
||||
out.push(
|
||||
<span key="hex" className={styles.hexBytes}>
|
||||
{hexBytes}
|
||||
</span>,
|
||||
);
|
||||
out.push(
|
||||
<span key="sep" className={styles.separator}>
|
||||
{' '}
|
||||
</span>,
|
||||
);
|
||||
out.push(
|
||||
<span key="ascii" className={styles.asciiChars}>
|
||||
{asciiChars}
|
||||
</span>,
|
||||
);
|
||||
out.push(<span key="hex">{hexBytes}</span>);
|
||||
out.push(<span key="sep"> </span>);
|
||||
out.push(<span key="ascii">{asciiChars}</span>);
|
||||
|
||||
return (
|
||||
<div
|
||||
className={styles.dataRow}
|
||||
className={clsx(styles.dataRow, anyDiff && styles.diffAny)}
|
||||
onContextMenu={onContextMenuMemo}
|
||||
{...tooltipProps}
|
||||
>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
}
|
||||
|
||||
.diff-any {
|
||||
background-color: rgba(255, 255, 255, 0.02);
|
||||
background-color: rgba(255, 255, 255, 0.03);
|
||||
}
|
||||
|
||||
.segment-dim {
|
||||
|
||||
Reference in New Issue
Block a user