Repository navigation
Inset the macOS window buttons inside the glass sidebar - #5529
Merged
Gabriel Dufresne (GabrielDuf) merged 2 commits intoOct 16, 2026
Merged
Conversation
…laces the window buttons Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the title bar's centre line Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Maxime Landry (mlandry-devolutions)
requested review from
Gabriel Dufresne (GabrielDuf)
and
a balanced review from Copilot
October 16, 2026 15:38
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Native title-bar changes still need validation on Intel Macs, maximize/fullscreen transitions, and published NativeAOT builds.
0 open findings
What changed in this PR
Refines the macOS glass sidebar introduced in #5511 by moving native window buttons inside the panel and aligning navigation controls with them.
Changes:
- Adds native button positioning and frame measurement with architecture-specific interop.
- Reapplies alignment on window changes, retaining fallback positions and logging frame changes.
| File | Description |
|---|---|
| src/UniGetUI.Avalonia/Views/MainWindow.axaml.cs | Aligns title-bar controls and refreshes positioning on window changes. |
| src/UniGetUI.Avalonia/Infrastructure/MacGlassWindowHelper.cs | Adds AppKit helpers to measure and reposition native window buttons. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Gabriel Dufresne (GabrielDuf)
approved these changes
Oct 16, 2026
Gabriel Dufresne (GabrielDuf)
deleted the
fix/macos-titlebar-row-traffic-lights
branch
October 16, 2026 16:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With the macOS glass look (#5511) the sidebar floats in a rounded panel 8 pt from the window edges, but macOS keeps the close/minimise/zoom buttons at the bare title-bar position, 7 pt from the edge: the red button sits on the panel's rounded corner. The back and sidebar buttons were placed with fixed values (traffic lights centred at 14 pt, 76 pt inset) measured before macOS 26 and the glass sidebar, so they ended up 8 pt from the zoom button and 2 pt above the traffic lights.
MacGlassWindowHelper.GetZoomButtonFramereads where macOS placed the zoom button, and the back/sidebar row aligns to its centre line, 14 pt after it. The previous constants remain as a fallback. Each new frame is logged once, to help diagnose other macOS versions.MacGlassWindowHelper.SetWindowButtonsPositionmoves them inside the glass panel (red button 20 pt from the edge, centred on the 44 pt bar, the search field's line), like System Settings. Same technique as Electron'strafficLightPosition: the title-bar container is resized and the buttons repositioned, re-applied on resize, zoom and state changes because macOS lays them out again.LibraryImportAppKit interop as the glass helper: no reflection, AOT-safe;NSRectreturns go throughobjc_msgSend_streton x64. Full screen is unchanged.Tested on macOS 26.7.1 (Apple Silicon, normal window): the zoom button moves from x = 47, y = 6 to x = 60, y = 14, and the back/sidebar buttons follow. Not yet checked: maximized window, leaving full screen, Intel Mac.
Relates to UNI-36
🤖 Generated with Claude Code