Skip to content

fix(#194): an unshrunk tab is exactly its natural width - #195

Merged
octalide merged 1 commit into
devfrom
fix/194
Oct 1, 2026
Merged

octalide merged 1 commit into
devfrom
fix/194

Conversation

@octalide

@octalide octalide commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

Closes #194

tabs.width rebuilt each tab's width as least + (natural - least) * fit. At fit = 1 that sum can come out a hair short of natural in floating point, so the label box was a fraction of a pixel narrower than the label, and fit_box (#177) cut it with an ellipsis even when the bar had room to spare. octalide/ac's docked tab strips all showed "Behavi…".

A tab the bar has room for now takes its natural width directly. The fix is in the lossy reconstruction, not a tolerance in fit_box.

Test: bar__unshrunk_tabs_are_their_natural_width sweeps paddings that don't land on whole pixels (as a scaled theme gives), with closable and unclosable tabs. It fails on dev (exit 2) and passes with the fix.

Ran: mach test . (223 pass), mach fmt --check ., and the gallery and panel demo tests after mach dep pull. Goldens unchanged.

tabs.width rebuilt every tab's width as least plus the rest times the
shrink factor. at a factor of one that sum can land a hair short of the
natural width in floating point, so the label box came out a fraction of a
pixel narrower than the label and fit_box cut it with an ellipsis. a tab the
bar has room for now takes its natural width directly. the test sweeps
paddings that do not land on whole pixels and fails without the fix.
@octalide
octalide merged commit dee5fd1 into dev Oct 1, 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.

fix: unshrunk tabs cut their labels with an ellipsis

1 participant