From: Ivan Ivlev <iviv@etersoft.ru> Signed-off-by: Ivan Ivlev <iviv@etersoft.ru> --- dlls/comctl32/tests/toolbar.c | 4 ++-- dlls/comctl32/toolbar.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c index b25a030bbb2..ece556a338d 100644 --- a/dlls/comctl32/tests/toolbar.c +++ b/dlls/comctl32/tests/toolbar.c @@ -3133,7 +3133,7 @@ static void test_wrap(void) SendMessageA(hToolbar, TB_ADDBUTTONSA, 2, (LPARAM)buttons); SendMessageA(hToolbar, TB_AUTOSIZE, 0, 0); result = SendMessageA(hToolbar, TB_GETROWS, 0, 0); - todo_wine ok(result == 1, "Got unexpected nRows: %d.\n", result); + ok(result == 1, "Got unexpected nRows: %d.\n", result); DestroyWindow(hToolbar); @@ -3147,7 +3147,7 @@ static void test_wrap(void) SetWindowPos(hToolbar, NULL, 0, 0, toolbar_width - 1, 30, SWP_NOMOVE | SWP_NOZORDER); SendMessageA(hToolbar, TB_AUTOSIZE, 0, 0); result = SendMessageA(hToolbar, TB_GETROWS, 0, 0); - ok(result == 2, "Got unexpected nRows: %d.\n", result); + todo_wine ok(result == 2, "Got unexpected nRows: %d.\n", result); DestroyWindow(hToolbar); } diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 21e60dd4d09..4993a5c16cc 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -1415,6 +1415,8 @@ TOOLBAR_WrapToolbar(TOOLBAR_INFO *infoPtr) else if ((btnPtr[i].fsStyle & BTNS_SEP) && !(infoPtr->dwStyle & CCS_VERT)) cx = (btnPtr[i].iBitmap > 0) ? btnPtr[i].iBitmap : SEPARATOR_WIDTH; + else if (btnPtr[i].fsStyle & BTNS_AUTOSIZE) + cx = TOOLBAR_AutoSizeButtonWidth(infoPtr, btnPtr + i); else cx = infoPtr->nButtonWidth; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10261