Repository navigation
Add a unified library header with native window frames - #642
Merged
Merged
Conversation
…eader The header model holds the header actions and state; the sidebar and content header widgets show it. Grid, Flow and Info become checkable actions, the search placement no longer depends on the folder name, and the macOS library toolbar is removed until the macOS frame binds to the same model. Adds the "Use the system title bar" option and the new 1x toolbar icons.
…n row The window keeps its native frame; only the caption row becomes client area. The header reports which pixels are controls and which drag the window, and drawn caption buttons get input as non-client messages, so snap layouts, tooltips and the system animations stay native. The frame takes plain colors instead of the app theme.
…r model The title bar becomes transparent and the traffic lights stay native over the themed header surfaces. Back, forward, settings, server, help, the folder name, the view selector and the search are NSToolbar items driven by the header model; settings, server and help follow the sidebar width, and the search sits on the trailing edge.
Qt's view covers the title bar and doesn't let mouse-downs move the window, so a view over the header strip hands the drag to the window server, which moves and tiles the window. A double click follows the "Double-click a window's title bar to" setting, with Fill treated as zoom.
The spacers are unbordered so they stay out of the Liquid Glass backgrounds, and the sidebar end spacer becomes the gap between the two groups. Settings, server and help end in line with the sidebar title buttons, and back and forward start in line with the content.
AppKit gives the lead spacer a minimum slot, so below it a width change moves nothing and the alignment gave up at launch until the splitter moved. The spacer now grows through that dead zone, and the sidebar minimum width comes from the leftmost position the items can reach, so they never spill over the content.
Forcing the window layout applies each spacer change right away, so the alignment runs all its passes at once. On show it runs before the first frame, so the items no longer jump into place after launch.
The sidebar column now holds the sidebar header too, so hiding only the sidebar left the column in the splitter as an empty strip.
…affic lights are hidden In full screen AppKit moves the traffic lights out of the window right after the "will" notifications. The lead spacer then leaves the toolbar, so settings, server and help sit at the leading edge and follow the traffic lights when the menu bar reveals them. The sidebar end spacer takes up that move, so back and forward stay in line with the content.
When the menu bar reveals the traffic lights, AppKit can move the items after the toolbar window moves, so realigning on the window move left back and forward shifted by the width of the traffic lights. The sidebar end spacer now reports when it moves on screen, watching the frames of the views that host it, and the alignment follows that instead.
… new host view AppKit can move the spacer to another host view in the same window, which calls viewDidMoveToSuperview but not viewDidMoveToWindow, so the spacer now watches its ancestors again in both. It also reports only moves, so the width changes made by the alignment no longer queue another pass.
…ntity A failed check also left the header part in the window on the stack, which deleted it and made cleanup() crash.
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.
No description provided.