fix(windows): align the titlebar ... with the window-control rhythm

The three native window controls are 34px tiles, so consecutive glyph
centres sit 34px apart. The overflow ... was inset by `pr_3` (12px),
putting its centre `15 + 12 + 17` = 44px from the minimise glyph — a
10px overshoot that read as the button drifting away from the group
rather than as deliberate separation.

`pr_1` (4px) lands it at 36px. Measured on a 1.5x display: 54.5 physical
px between ... and minimise vs 51px between the window controls, i.e.
within ~2 logical px of the native rhythm, while keeping just enough
slack that it does not read as a fourth window control.

macOS is unaffected (controls are on the left there; `pr_2` still holds).
The `strip_w` 114px reserve is untouched -- this padding lives inside the
strip box, so shrinking it only shifts the ... right and hands the chip
row 8px more.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
thomas
2026-07-19 17:54:31 +08:00
co-authored by Claude Opus 4.8
parent 2e4cc77a47
commit 9b1c7bfcac
+7 -3
View File
@@ -897,9 +897,13 @@ impl Tty7App {
.pl_0()
.pr_2()
// On Windows/Linux the window controls (─ ▢ ✕) sit on the right, right
// where the "⋯" lands; give it extra right breathing room there so it
// reads as a menu affordance, not a fourth window control.
.when(!cfg!(target_os = "macos"), |this| this.pr_3())
// where the "⋯" lands, so its inset has to match *their* rhythm: the
// 34px tiles put consecutive glyph centres 34px apart, and the "⋯"
// centre sits `15 + pr + 17` from the minimise glyph. `pr_1` (4px)
// lands at 36px — reading as part of the same row, with just enough
// slack to not be mistaken for a fourth window control. The old
// `pr_3` (12px) made it 44px, visibly adrift from the group.
.when(!cfg!(target_os = "macos"), |this| this.pr_1())
.min_w_0()
.child(chips)
// In sidebar mode the rail owns "New Tab" (a "+" in its own top bar),