comdlg32: IFileDialog navigation bar control. Part 1.
Redo of !1857 (closed), 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:
And part 2:
Part 2 branch can be found here.
Requires !2068 (merged), otherwise if application doesn't request comctl v6 (e.g. qapitrace), navigation bar will look like this:
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 fromhspacing
initemdlg.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
- 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
intoNAVBAR_PushButtonProc
/PUSHBUTTON_SUBCLASS_ID
, describes it more accurately - remove brackets in
WM_LBUTTONDOWN
/WM_LBUTTONDBLCLK
inNAVBAR_PushButtonProc
, for some consistency, usually not placing them if I don't have to - swap
SWP_NOSIZE | SWP_NOMOVE
toSWP_NOMOVE | SWP_NOSIZE
in tab navigation commit, so that it matches the argument order - add
LAYOUT_ITEMS_N
define for use inBeginDeferWindowPos
, 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)
Edited by Vladislav Timonin