31 lines
1.3 KiB
TypeScript
31 lines
1.3 KiB
TypeScript
import { themeQuartz } from 'ag-grid-community';
|
|
|
|
// Shared AG-Grid theme for every logbook table (Recent QSOs, Worked-before,
|
|
// Cluster, Net, QSL Manager). Colours are wired to the app's semantic CSS
|
|
// variables (see style.css) instead of hardcoded hex, so the grids follow the
|
|
// active theme (light-warm / dark-warm / graphite / high-contrast) at runtime —
|
|
// flipping <html data-theme> re-resolves these var() references with no
|
|
// re-render. Keep this the single source of truth; per-grid tweaks (e.g. row
|
|
// height) chain a `.withParams({...})` on top.
|
|
export const hamlogGridTheme = themeQuartz.withParams({
|
|
fontFamily: 'inherit',
|
|
fontSize: 12.5,
|
|
backgroundColor: 'var(--card)',
|
|
foregroundColor: 'var(--foreground)',
|
|
headerBackgroundColor: 'var(--muted)',
|
|
headerTextColor: 'var(--muted-foreground)',
|
|
headerFontWeight: 600,
|
|
oddRowBackgroundColor: 'color-mix(in srgb, var(--muted) 40%, var(--card))',
|
|
rowHoverColor: 'color-mix(in srgb, var(--accent) 55%, var(--card))',
|
|
selectedRowBackgroundColor: 'var(--accent)',
|
|
borderColor: 'var(--border)',
|
|
rowBorder: { color: 'var(--border)', width: 1 },
|
|
columnBorder: { color: 'var(--border)', width: 1 },
|
|
cellHorizontalPadding: 10,
|
|
rowHeight: 30,
|
|
headerHeight: 32,
|
|
spacing: 4,
|
|
accentColor: 'var(--primary)',
|
|
iconSize: 12,
|
|
});
|