style(matrix): pin the label column so RTTY cannot shift it
The width was set for three characters, so the column grew when the rotation came round to RTTY and every band beneath it moved — which the eye reads as the matrix sliding rather than the row changing. Sized once for the longest label it can show and pinned there, header spacer included; past four characters (PSK31, MSK144) the type gives way instead of the column.
This commit is contained in:
@@ -334,7 +334,7 @@ export function BandSlotGrid({ wb, busy, currentBand, currentMode, bands, modes,
|
||||
<table className="border-separate" style={{ borderSpacing: 3 }}>
|
||||
<thead>
|
||||
<tr>
|
||||
<th className="w-[26px]" />
|
||||
<th className="w-[38px] min-w-[38px] max-w-[38px]" />
|
||||
{cols.map((b) => (
|
||||
<th
|
||||
key={b.tag}
|
||||
@@ -363,11 +363,14 @@ export function BandSlotGrid({ wb, busy, currentBand, currentMode, bands, modes,
|
||||
onClick={clsBase === 'DIG' && digModes.length ? cycleDig : undefined}
|
||||
title={clsBase === 'DIG' && digModes.length ? t('bsg.digCycle') : undefined}
|
||||
className={cn(
|
||||
'font-mono font-semibold pr-1.5 text-right w-[26px]',
|
||||
// RTTY and PSK31 do not fit at 11px in a column sized for
|
||||
// three characters, and widening it would push the whole
|
||||
// matrix sideways.
|
||||
cls.length > 3 ? 'text-[9px]' : 'text-[11px]',
|
||||
// Sized once for the LONGEST label the rotation can show,
|
||||
// and pinned there: a column that grows when RTTY comes
|
||||
// round shifts every band beneath it, and the eye reads
|
||||
// that as the matrix moving rather than the row changing.
|
||||
'font-mono font-semibold pr-1.5 text-right w-[38px] min-w-[38px] max-w-[38px] overflow-hidden',
|
||||
// Beyond four characters (PSK31, MSK144) the type gives way
|
||||
// instead of the column.
|
||||
cls.length > 4 ? 'text-[9px]' : 'text-[11px]',
|
||||
clsBase === 'DIG' && digModes.length ? 'cursor-pointer hover:text-foreground' : '',
|
||||
classCurrent ? 'text-primary font-extrabold' : 'text-muted-foreground',
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user