Implements navigation bar featuring: - back/forward buttons - go up button - address crumbs - hides crumbs when there's not enough space to display all of them - always shows at least 2 crumbs - truncating them if needed - first crumb is at least 56px - aligns label to the left if truncated - right clicking on the crumb, or free space, opens a menu with `Copy address as text` and `Edit address` options - reuses existing crumbs to avoid some flickering - overflow menu - ~~first crumb is always moved here~~ - removes the split, if there are no items in the menu - hidden crumbs are moved here - left ~~or right~~ click on the button starts address editing - address edit - accepts an existing path - expands environment variables, e.g. `%APPDATA%\Microsoft` -> `C:\users%USERNAME%\AppData\Roaming\Microsoft` - errors with a `MessageBox` on nonexistent paths - refresh button - changes into go to button when editing address - DPI scaling
Screenshots:
![navbar-crumbs-classic](/uploads/8c9a806b57f8e456fcbfd3cbc1ef3bb7/navbar-crumbs-classic.png)
![navbar-crumbs-light](/uploads/9c8a7acf9b55ae5ac182219edd45b65d/navbar-crumbs-light.png)
![navbar-edit-classic](/uploads/f68309bbc9200a8d8d4e3cd692179409/navbar-edit-classic.png)
![navbar-edit-light](/uploads/6798e79e6d2498a052b0ecbc2545c6e4/navbar-edit-light.png)
![navbar-120dpi-classic](/uploads/72abee382ab6171ff9c1b99a9065c845/navbar-120dpi-classic.png)
![navbar-120dpi-light](/uploads/538a030bc2028f8654d6c35d6f2825dd/navbar-120dpi-light.png)
Remaining issues: - crumbs not lighting up when hovered sometimes - can be observed in current file dialog, hovering over dropdown arrow of a file type fixes it for a moment - crumbs flickering on address change sometimes - mostly when there's not enough space to display all of them - `DeferWindowPos` doesn't seem to be atomic in Wine, presumably is in native Windows? - unexpected address conversion for some PIDLs - e.g. `Desktop` -> `C:\users%USERNAME%\Desktop`, which is an entirely different location - or `My Computer` into an empty string - known folders are not handled by address edit, e.g. `Desktop`, `My Computer` - icons are not DPI scaled - while writing this: ``` 0024:fixme:bitmap:NtGdiCreateBitmap planes = 0 0024:err:system:user_check_not_lock BUG: holding USER lock wine/dlls/win32u/sysparams.c:396: user_check_not_lock: Assertion `0' failed. wine: Assertion failed at address F7FF8549 (thread 0024), starting debugger... ``` - can't reproduce, happened when clicking on an item in overflow menu - race condition? cosmic ray?
Addresses following bugs: - https://bugs.winehq.org/show_bug.cgi?id=29912 - https://bugs.winehq.org/show_bug.cgi?id=50338 - https://bugs.winehq.org/show_bug.cgi?id=51855 (partially? no search box)
-- v9: comdlg32: Add refresh/go to button to IFileDialog navigation bar. comdlg32: Add address edit to IFileDialog navigation bar. comdlg32: Add breadcrumb overflow menu to IFileDialog navigation bar. comdlg32: Add address breadcrumbs to IFileDialog navigation bar.