On Wed Dec 28 23:08:08 2022 +0000, Vladislav Timonin wrote:
> Just some padding so that the icon isn't so close to the text. Probably
> could use a comment.
> `dis->rcItem.left, dis->rcItem.top` on the left.
> `dis->rcItem.left - (icon_width / 2), dis->rcItem.top` on the right.
> ![overflow-icon](/uploads/bca861c60e2ee47bd3af6bbc80fa92f8/overflow-icon.png)
Was pointed out that I shouldn't draw outside `rcItem` and can add padding in `WM_MEASUREITEM` instead. Should've read docs thoroughly enough ,_,
![overflow-icon-2](/uploads/c3468a6a90d9616ced0c9a760255899c/overflow-icon-2.png)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1857#note_20183
On Wed Dec 28 19:30:29 2022 +0000, Esme Povirk wrote:
> Drawing outside of rcItem doesn't seem right. Why is this necessary?
Just some padding so that the icon isn't so close to the text. Probably could use a comment.
`dis->rcItem.left, dis->rcItem.top` on the left.
`dis->rcItem.left - (icon_width / 2), dis->rcItem.top` on the right.
![overflow-icon](/uploads/bca861c60e2ee47bd3af6bbc80fa92f8/overflow-icon.png)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1857#note_20182
On Wed Dec 28 19:30:28 2022 +0000, Esme Povirk wrote:
> I think you could remove the need for this by drawing the left border
> outside the window.
If you mean extending it to be painted under crumbs, it originally was, static control with `SS_GRAYFRAME` taking up full width. But that had issues with frame being painted over crumbs on initial dialog show. And right border trailing on resize that I was ignoring thinking it was caused by [54137](https://bugs.winehq.org/show_bug.cgi?id=54137).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1857#note_20181
On Wed Dec 28 19:30:30 2022 +0000, Esme Povirk wrote:
> I think removing items from the list like this is confusing. It also
> results in the need for a special case "preserving" the first crumb in
> the layout code.
This is similar to what Windows does, but it indeed does complicate things a little, I'll remove it.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1857#note_20180
Esme Povirk (@madewokherd) commented about dlls/comdlg32/navbar.c:
> while (ILRemoveLastID(pidl));
> ILFree(pidl);
>
> + NAVBAR_OVERFLOW_Clear(info);
> +
> + /* move the first crumb to overflow menu, if there are at least 2 crumbs */
> + crumb1 = LIST_ENTRY(list_head(&new_crumbs), struct crumb, entry);
> + if (crumb1 && crumb1->entry.next != &new_crumbs)
> + {
> + NAVBAR_OVERFLOW_Insert(info, crumb1->pidl, crumb1->display_name);
> + DestroyWindow(crumb1->hwnd);
> +
> + list_remove(&crumb1->entry);
I think removing items from the list like this is confusing. It also results in the need for a special case "preserving" the first crumb in the layout code.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1857#note_20178
Esme Povirk (@madewokherd) commented about dlls/comdlg32/navbar.c:
> hwnd, 0, COMDLG32_hInstance, NULL);
> SetWindowSubclass(info->background_hwnd, NAVBAR_BACKGROUND_SubclassProc, 0, (DWORD_PTR)info);
>
> + info->overflow_hwnd = CreateWindowExW(0, WC_BUTTONW, NULL,
For accessibility it'd be good to give this button a title.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1857#note_20177