Pane focus reads from band strength, not from the dots; cursor visible in both panes

The previous model made the dotted rectangle the de-facto focus signal: the
cursor row got ONLY dots (and only in the active pane), so an unfocused pane's
cursor row disappeared entirely, and selection strength was the only band
difference. Wrong way around for a commander UI.

Now (matching Win7 Explorer / the commander convention):
- tr.highlighted = "selected via Space" OR "cursor row" — the template ORs
  them, so the cursor row always carries the selection band in BOTH panes.
- Pane focus is what changes the band: strong Aero band (--w7-el-grad-h) in
  the focused pane, 7.css's own faint inactive wash in the unfocused pane —
  that wash IS Win7's inactive-selection colour, faint by design.
- The dotted rect is demoted to what it was in Win7: a keyboard-focus marker
  layered ON TOP of the band, focused pane only. It is no longer the thing
  that tells you which pane is active.

Harness now renders a focused and an unfocused pane stacked, with selected
rows and a cursor row in each; verified zoomed in light and dark.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-08-16 02:10:36 +02:00
co-authored by Claude
parent 4102020f5c
commit 66076cf1d7
3 changed files with 40 additions and 12 deletions
+1 -1
View File
@@ -279,7 +279,7 @@
(click)="rowClick($event, i)"
(dblclick)="openAt(i)"
(contextmenu)="rowContextMenu($event, i)"
[class.highlighted]="isSelected(entry)"
[class.highlighted]="isSelected(entry) || i === panel().cursor()"
[class.is-cursor]="i === panel().cursor() && isActive()"
>
<td>
+13 -8
View File
@@ -639,19 +639,24 @@ body {
border-color: var(--w7-li-bd-hl);
}
/* Selection in the FOCUSED panel. 7.css's tr.highlighted is Win7's *inactive*
selection — a near-white wash that is almost invisible when it is the
panel you are actually working in. Win7 drew the focused pane's selection
as the stronger Aero band, which is what --w7-el-grad-h/-bd-h already are
(and the dark palette restates them, so this recolours for free). */
/* Pane-focus model (commander convention, matching Win7 Explorer):
the CURSOR ROW always carries the selection band in BOTH panels —
tr.highlighted covers "selected via Space" AND "cursor row" (the template
ORs them). What changes with pane focus is the band's strength, never
whether it exists:
- focused pane -> strong Aero band (below)
- unfocused pane -> 7.css's own tr.highlighted, which IS Win7's
inactive-selection wash — faint by design, not a bug.
The dotted focus rectangle is NOT the focus signal; it is layered on top
of the band in the focused pane only, the way Win7 drew the keyboard
focus rect over the selected item. */
.win7 table.is-active > tbody > tr.highlighted {
background: var(--w7-el-grad-h);
border-color: var(--w7-el-bd-h);
}
/* The keyboard cursor: one dotted focus rectangle around the ROW, the way
Win7 drew a focused-but-unselected item. Applying this per cell (tr > *)
draws a dotted box around every cell instead — visibly wrong. */
/* One dotted rectangle around the ROW; per cell (tr > *) draws a dotted box
around every cell instead — visibly wrong. */
.win7 table > tbody > tr.is-cursor {
outline: 1px dotted var(--w7-el-c);
outline-offset: -1px;