From: Ivan Ivlev <iviv@etersoft.ru> Signed-off-by: Ivan Ivlev <iviv@etersoft.ru> --- dlls/comctl32/tests/toolbar.c | 2 +- dlls/comctl32/toolbar.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c index 48dffbaf16b..499bc0cc732 100644 --- a/dlls/comctl32/tests/toolbar.c +++ b/dlls/comctl32/tests/toolbar.c @@ -3160,7 +3160,7 @@ static void test_wrap(void) SetWindowPos(hToolbar, NULL, 0, 0, 427, 30, SWP_NOMOVE | SWP_NOZORDER); SendMessageA(hToolbar, TB_AUTOSIZE, 0, 0); result = SendMessageA(hToolbar, TB_GETROWS, 0, 0); - todo_wine ok(result == 2, "Got unexpected nRows: %d.\n", result); + ok(result == 2, "Got unexpected nRows: %d.\n", result); DestroyWindow(hToolbar); } diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 5dffa4687c9..e40c9cd2ef9 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -1439,10 +1439,9 @@ TOOLBAR_WrapToolbar(TOOLBAR_INFO *infoPtr) continue; } - /* The layout makes sure the bitmap is visible, but not the button. */ /* Test added to also wrap after a button that starts a row but */ /* is bigger than the area. - GA 8/01 */ - if ((x + cx - (infoPtr->nButtonWidth - infoPtr->nBitmapWidth) / 2 > width) || + if ((x + cx > width) || ((x == infoPtr->nIndent) && (cx > width))) { BOOL bFound = FALSE; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10261