From 9b1c7bfcac5136b412808ab7c701ece55f61058f Mon Sep 17 00:00:00 2001 From: thomas Date: Sun, 19 Jul 2026 17:54:31 +0800 Subject: [PATCH] fix(windows): align the titlebar ... with the window-control rhythm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- src/ui/tab_strip.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ui/tab_strip.rs b/src/ui/tab_strip.rs index a110e045..7592163e 100644 --- a/src/ui/tab_strip.rs +++ b/src/ui/tab_strip.rs @@ -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),