Repository navigation
Let a header put the traffic lights further in - #40
igor-alexandrov wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Thanks, and sorry for the wait. I merged #34 first, which reads the spacing AppKit gives the buttons (23 points from macOS 26) and measures the header's room from the zoom button's right edge. That conflicts with this one, but it also means a Happy to take |
align_traffic_lights_at takes the close button's left edge in AppKit points; align_traffic_lights keeps the usual 16. Hindsight's toolbar puts the buttons 20 points in and carries its own copy of the AppKit alignment only to change that one number.
ac8eaa7 to
a17a5ff
Compare
|
@coderabbitai review |
User-visible UI impact: none. Existing callers of
align_traffic_lightskeep the 16-point inset.Why
Hindsight runs its content under the hidden title bar and puts the traffic lights at the start of a 52-point unified toolbar, with the close button 20 points in to match its toolbar padding.
align_traffic_lightsfixes that edge at 16, so Hindsight carries a copy of the AppKit alignment in its own code that changes only that one number. Calling both is not an option: each would move the buttons back every frame.What
align_traffic_lights_at(frame, ctx, header_height, left): the same alignment, with the close buttonleftAppKit points in. The buttons stay 20 points apart andleftdoes not scale with zoom.align_traffic_lightsnow calls it with 16, so its behaviour is unchanged.footprintstill reportsTRAFFIC_LIGHTS_WIDTH(84); the docs say a header that moves the buttons in leaves the extra room itself.If you would rather not add a public function, a
leftfield somewhere you prefer works just as well for Hindsight.Checks
On Linux:
cargo fmt --all --check,cargo clippy --locked -p fastframe-titlebar --all-targets -- -D warnings,cargo test --locked -p fastframe-titlebar --all-targets, andRUSTDOCFLAGS='-D warnings' cargo doc -p fastframe-titlebar --no-deps. For macOS,cargo checkandcargo clippy -- -D warningswith--target aarch64-apple-darwin, type-checked from Linux only. Not run on a Mac.Summary by CodeRabbit