"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "dlls/comctl32/toolbar.c" between
wine-5.12.tar.xz and wine-5.13.tar.xz

About: Wine is an Open Source implementation of the MS Windows API on top of X, OpenGL, and Unix. Think of Wine as a compatibility layer for running Windows programs. Development release.

toolbar.c  (wine-5.12.tar.xz):toolbar.c  (wine-5.13.tar.xz)
skipping to change at line 3046 skipping to change at line 3046
} }
static LRESULT static LRESULT
TOOLBAR_AutoSize (TOOLBAR_INFO *infoPtr) TOOLBAR_AutoSize (TOOLBAR_INFO *infoPtr)
{ {
TRACE("auto sizing, style=%#x\n", infoPtr->dwStyle); TRACE("auto sizing, style=%#x\n", infoPtr->dwStyle);
TRACE("nRows: %d, infoPtr->nButtonHeight: %d\n", infoPtr->nRows, infoPtr->nB uttonHeight); TRACE("nRows: %d, infoPtr->nButtonHeight: %d\n", infoPtr->nRows, infoPtr->nB uttonHeight);
if (!(infoPtr->dwStyle & CCS_NORESIZE)) if (!(infoPtr->dwStyle & CCS_NORESIZE))
{ {
RECT window_rect, parent_rect; RECT window_rect, client_rect, parent_rect, border;
UINT uPosFlags = SWP_NOZORDER | SWP_NOACTIVATE; UINT uPosFlags = SWP_NOZORDER | SWP_NOACTIVATE;
HWND parent; HWND parent;
INT x, y, cx, cy; INT x, y, cx, cy;
parent = GetParent (infoPtr->hwndSelf); parent = GetParent (infoPtr->hwndSelf);
if (!parent || !infoPtr->bDoRedraw) if (!parent || !infoPtr->bDoRedraw)
return 0; return 0;
GetWindowRect(infoPtr->hwndSelf, &window_rect);
GetClientRect(infoPtr->hwndSelf, &client_rect);
border = window_rect;
MapWindowPoints(0, infoPtr->hwndSelf, (POINT *)&border, 2);
border.right -= border.left + client_rect.right - client_rect.left;
border.bottom -= border.top + client_rect.bottom - client_rect.top;
GetClientRect(parent, &parent_rect); GetClientRect(parent, &parent_rect);
x = parent_rect.left; x = parent_rect.left;
y = parent_rect.top; y = parent_rect.top;
cy = TOP_BORDER + infoPtr->nRows * infoPtr->nButtonHeight + BOTTOM_BORDE R; cy = TOP_BORDER + infoPtr->nRows * infoPtr->nButtonHeight + BOTTOM_BORDE R;
cx = parent_rect.right - parent_rect.left; cx = parent_rect.right - parent_rect.left;
if ((infoPtr->dwStyle & CCS_BOTTOM) == CCS_NOMOVEY) if ((infoPtr->dwStyle & CCS_BOTTOM) == CCS_NOMOVEY)
{ {
GetWindowRect(infoPtr->hwndSelf, &window_rect);
MapWindowPoints( 0, parent, (POINT *)&window_rect, 2 ); MapWindowPoints( 0, parent, (POINT *)&window_rect, 2 );
y = window_rect.top; y = window_rect.top;
} }
if ((infoPtr->dwStyle & CCS_BOTTOM) == CCS_BOTTOM) if ((infoPtr->dwStyle & CCS_BOTTOM) == CCS_BOTTOM)
{
GetWindowRect(infoPtr->hwndSelf, &window_rect);
y = parent_rect.bottom - ( window_rect.bottom - window_rect.top); y = parent_rect.bottom - ( window_rect.bottom - window_rect.top);
}
if (infoPtr->dwStyle & CCS_NOPARENTALIGN) if (infoPtr->dwStyle & CCS_NOPARENTALIGN)
uPosFlags |= SWP_NOMOVE; uPosFlags |= SWP_NOMOVE;
if (!(infoPtr->dwStyle & CCS_NODIVIDER)) if (!(infoPtr->dwStyle & CCS_NOMOVEY) && !(infoPtr->dwStyle & CCS_NODIVI
cy += GetSystemMetrics(SM_CYEDGE); DER))
y += GetSystemMetrics(SM_CYEDGE);
if (infoPtr->dwStyle & WS_BORDER) x += border.left;
{ y += border.top;
cx += 2 * GetSystemMetrics(SM_CXBORDER); cx += border.right;
cy += 2 * GetSystemMetrics(SM_CYBORDER); cy += border.bottom;
}
SetWindowPos(infoPtr->hwndSelf, NULL, x, y, cx, cy, uPosFlags); SetWindowPos(infoPtr->hwndSelf, NULL, x, y, cx, cy, uPosFlags);
} }
if ((infoPtr->dwStyle & TBSTYLE_WRAPABLE) || (infoPtr->dwExStyle & TBSTYLE_E X_VERTICAL)) if ((infoPtr->dwStyle & TBSTYLE_WRAPABLE) || (infoPtr->dwExStyle & TBSTYLE_E X_VERTICAL))
{ {
TOOLBAR_LayoutToolbar(infoPtr); TOOLBAR_LayoutToolbar(infoPtr);
InvalidateRect( infoPtr->hwndSelf, NULL, TRUE ); InvalidateRect( infoPtr->hwndSelf, NULL, TRUE );
} }
 End of changes. 7 change blocks. 
12 lines changed or deleted 15 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)