Skip to content

Function bar labels that do not fit are cut at the end - #106

Closed
crustovsky wants to merge 3 commits into
one-bytefrom
bar-labels-cut-at-end
Closed

crustovsky wants to merge 3 commits into
one-bytefrom
bar-labels-cut-at-end

Conversation

@crustovsky

Copy link
Copy Markdown
Owner

Closes #104. Stacked on the "1 byte" PR.

The bar's buttons paint their own label: where it does not fit it is cut at the end, key first ("F1 Ab…"), where the style cut the middle ("F1...ut"). A slot too narrow for more shows its key alone; a free key shows nothing. The size hint is still the whole label's.

In a 760 px window at a 12 pt font the plain layer fits whole; the other layers are cut. Short labels lose as much as long ones ("F5 …" for Pack), since the buttons shrink in proportion; a floor per button would bring back a minimum width for the window, so there is none.

test_window: at 760 px every shown label starts with its key and is a prefix of the whole one; with room it is whole.

🤖 Generated with Claude Code

Since #91 a layer wider than the window is cut instead of widening it,
and the style did the cutting, in the middle: "F1 About" became
"F1...ut". The start of the word is what tells the commands apart.

The bar's buttons paint their own label: cut at the end, so the key
and the start of the word stay ("F1 Ab…"), given all the button has
but its frame. Dots alone are never shown: a slot too narrow for more
shows its key, and a free key nothing. The size hint is still the
whole label's, so with room to spare nothing changes.

Closes #104

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KxLwQtp3yonrpxnzSFpc3w
crustovsky and others added 2 commits November 26, 2026 12:58
…ssume a font

CI failed on two tests written on a desktop with a 12 pt monospace
font; CI has a smaller, proportional one.

The bound on what a bar may ask of the window (75 average characters,
#96) caught a real one there: the conflict bar's two notes, "Source
... Target ..." and "There is no trash here ...", were plain labels as
wide as their text, and a narrow font makes the bound tighter than the
buttons' padding allows for. Both notes give way now, and the answers
of the conflict and the error bar are rows that wrap, as the panels'
are. "Apply to all" follows the buttons instead of sitting at the far
edge.

The test of the function bar's cut labels (#104) set the window to
760 px, where CI's font lets the whole layer fit. It takes three
quarters of what the layer's labels measure instead.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KxLwQtp3yonrpxnzSFpc3w
…is the panels'

The commit before this made the answers of the conflict and error
bars wrap. They sit in the job strip, which a vertical splitter sizes
by hints alone: a wrapped row there is not given its height, and the
bar's lines end up over one another. Wrapping the strip is its own
piece of work (#109); the two rows are plain again. The bars' notes
still give way.

The bound of 75 average characters (#96) is asked of the panels that
take a pane's place: pack, sync, multi-rename and properties. With a
job running the window's minimum is the job row's, which CI's font and
style put past the bound.

FlowLayout honours its contents margins.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KxLwQtp3yonrpxnzSFpc3w
@crustovsky

Copy link
Copy Markdown
Owner Author

In main through #107; released in v0.9.6.

@crustovsky crustovsky closed this Nov 26, 2026
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.

1 participant