Skip to content

win32: restyle the standalone tab strip - #14

Merged
shiweis merged 5 commits into
shiweis:mainfrom
alihandroid:feat/windows-tab-strip-upstream
Oct 29, 2026
Merged

shiweis merged 5 commits into
shiweis:mainfrom
alihandroid:feat/windows-tab-strip-upstream

Conversation

@alihandroid

@alihandroid alihandroid commented Oct 23, 2026 •

Copy link
Copy Markdown

Restyle the standalone Windows tab strip with equal-width tabs that fill the row, centered Segoe UI titles, theme-derived selection/hover/divider colors, right-side hover close buttons, and a right-edge new-tab button. The native caption remains separate from the tab row.

Use the same close rectangle for painting and hit testing. Drag reordering follows actual tab rectangles, including the remainder pixels distributed across fitted tabs. Two geometry regressions cover fitted/overflow layouts and all 64 nonuniform drag thresholds.

Native Windows verification passed 21 checks across dark opaque, opacity 0.8, and light fixtures: independent PTY input, tab switching, mouse hit targets, creation/closing, persistent titles, normal shutdown, and successful exit status. The test stages the executable, matching console runtime, and portable resources under a local Windows temporary directory. It validates owned HWNDs and uses no global input or foreground requests.

Existing tab-overview and visibility regressions also passed (12 and 18 assertions). Captures validate the GDI tab strip; they do not establish OpenGL compositing behavior. Minimum-width overflow and cross-monitor DPI handling remain existing limitations.

Native test:

pwsh.exe -NoProfile -ExecutionPolicy Bypass -File test/win32/test_tab_bar.ps1 `
  -ExePath "$PWD/zig-out/bin/ghostty.exe" `
  -ResourcesPath "$PWD/zig-out/share" `
  -OutputDirectory "$env:TEMP/ghostty-tab-bar-proof" -Case all

Visual reference captures (the painting style is unchanged by the drag-geometry/test corrections):

Before:
Before: left-aligned titles and blue active underline

Dark:
After: centered titles, equal-width tabs and theme-derived selection

Light:
After: light theme tab strip

alihandroid and others added 5 commits October 23, 2026 14:09
Use actual fitted tab rectangles for drag thresholds and cover remainder widths with deterministic geometry tests. Stage the test executable, console runtime and resources under local Windows temp paths and fail the regression when shutdown requires forced termination.
Copy themes, shell integration, the source terminfo sentinel and console runtime license into the local test payload instead of recursively following the compiled Unix terminfo tree. Remove staging on setup failure.
@shiweis
shiweis merged commit c01c855 into shiweis:main Oct 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants