Redo of !1857, as suggested, the plan is to split original MR in half, breadcrumbs in first (this) MR, and address edit in another.
The changes are mostly cleanup (formatting, renaming, unused variables, missing free).
Visually, it hasn't changed from original MR, part 1 changes are:
![](/uploads/42fa717ce6f7adb40d6b0dcbbe0878fa/changes-1-3.png)
And part 2:
![](/uploads/cbdaa2d4b5b8945587e1f761a4609a08/changes-2.png)
Part 2 branch can be found [here](https://gitlab.winehq.org/vt/wine/-/commits/fd-navbar-part2).
Requires !2068, otherwise if application doesn't request comctl v6 (e.g. qapitrace), navigation bar will look like this:
![no-comctl-v6](/uploads/03e6a8b6dcf827114157e79640e49fea/no-comctl-v6.png)
Closes: - https://bugs.winehq.org/show_bug.cgi?id=29912 - https://bugs.winehq.org/show_bug.cgi?id=54812 - https://bugs.winehq.org/show_bug.cgi?id=50338 (partially? fully with address edit?)
MR changes: - v2 - changed the gap between buttons to be scaled with DPI
- v3 - DPI scale the gap in layout calculation in breadcrumbs commit, missed it earlier - remove padding from layout calculation, `GetWindowRect` was unintentionally returning double padding, 4px from `hspacing` in `itemdlg.c:update_layout`, and another 4px from somewhere else - drop `comdlg32: Keep IExplorerBrowser in IFileDialog focused after Backspace.` hack - retain IExplorerBrowser view focus in IFileDialog when creating new view - redirect navigation bar buttons focus back to the previous window
- v4 - rename background to frame - calculate overflow button width into separate variable, [will come in handy in part 2](https://gitlab.winehq.org/vt/wine/-/commit/998b6987500edda02d6a9177c7da2032b...) - simplify show-at-least-N-crumbs logic - drop `comdlg32: Prevent arrow navigation of IFileDialog navigation bar buttons.` - drop `comdlg32: Don't paint focus rect in IFileDialog navigation bar buttons.` - add tab navigation - avoid taking button focus by sending `VK_SPACE` instead
- v5 - rebase on current master - rename `NAVBAR_ButtonProc`/`BUTTON_SUBCLASS_ID` into `NAVBAR_PushButtonProc`/`PUSHBUTTON_SUBCLASS_ID`, describes it more accurately - remove brackets in `WM_LBUTTONDOWN`/`WM_LBUTTONDBLCLK` in `NAVBAR_PushButtonProc`, for some consistency, usually not placing them if I don't have to - swap `SWP_NOSIZE | SWP_NOMOVE` to `SWP_NOMOVE | SWP_NOSIZE` in tab navigation commit, so that it matches the argument order - add `LAYOUT_ITEMS_N` define for use in `BeginDeferWindowPos`, to update the number of items in a single place instead of 2 or 3
Description edits: - v2 - Updated the changes image (by splitting it) - Added MR changes - v3 - Added description edits - Updated the changes image again (forgot the overflow button change)
-- v6: comdlg32: Avoid taking focus on LMB click in IFileDialog navigation bar buttons. comdlg32: Add tab navigation to IFileDialog navigation bar. comdlg32: Retain IExplorerBrowser view focus in IFileDialog when creating new view. comdlg32: Add breadcrumb overflow menu to IFileDialog navigation bar. comdlg32: Add inner border to breadcrumbs in IFileDialog navigation bar. comdlg32: Always show at least 2 crumbs in IFileDialog navigation bar. comdlg32: Reuse address breadcrumbs in IFileDialog navigation bar. comdlg32: Add address breadcrumbs to IFileDialog navigation bar. comdlg32: Add go up button to IFileDialog navigation bar. comdlg32: Add IFileDialog navigation bar control.