mirror of
https://github.com/reactos/reactos.git
synced 2024-10-01 23:14:53 +00:00
[0.4.7][COMCTL32] Workaround regression with toolbar in 7zip CORE-16169
The regression was introduced by SVN r68553 == git3b13364f05
Many thanks to the author Doug Lyons for excellent cooperation once more. Always a pleasure. Fix cherry picked from commits: 0.4.15-dev-663-gcd7db5df89
and 0.4.15-dev-664-g7c909cbc7c
This commit is contained in:
parent
0bdf4f5317
commit
0e86fe0bf8
|
@ -1408,6 +1408,11 @@ TOOLBAR_WrapToolbar(TOOLBAR_INFO *infoPtr)
|
||||||
if( !(infoPtr->dwStyle & TBSTYLE_WRAPABLE) &&
|
if( !(infoPtr->dwStyle & TBSTYLE_WRAPABLE) &&
|
||||||
!(infoPtr->dwExStyle & TBSTYLE_EX_VERTICAL) ) return;
|
!(infoPtr->dwExStyle & TBSTYLE_EX_VERTICAL) ) return;
|
||||||
|
|
||||||
|
#ifdef __REACTOS__ /* workaround CORE-16169 part 1 of 2 */
|
||||||
|
/* if width is zero then return */
|
||||||
|
if (infoPtr->client_rect.right == 0) return;
|
||||||
|
#endif
|
||||||
|
|
||||||
btnPtr = infoPtr->buttons;
|
btnPtr = infoPtr->buttons;
|
||||||
x = infoPtr->nIndent;
|
x = infoPtr->nIndent;
|
||||||
width = infoPtr->client_rect.right - infoPtr->client_rect.left;
|
width = infoPtr->client_rect.right - infoPtr->client_rect.left;
|
||||||
|
@ -3158,6 +3163,14 @@ 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->nButtonHeight);
|
TRACE("nRows: %d, infoPtr->nButtonHeight: %d\n", infoPtr->nRows, infoPtr->nButtonHeight);
|
||||||
|
|
||||||
|
#ifdef __REACTOS__ /* workaround CORE-16169 part 2 of 2 */
|
||||||
|
if ((infoPtr->dwStyle & TBSTYLE_WRAPABLE) || (infoPtr->dwExStyle & TBSTYLE_EX_VERTICAL))
|
||||||
|
{
|
||||||
|
TOOLBAR_LayoutToolbar(infoPtr);
|
||||||
|
InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!(infoPtr->dwStyle & CCS_NORESIZE))
|
if (!(infoPtr->dwStyle & CCS_NORESIZE))
|
||||||
{
|
{
|
||||||
RECT window_rect, parent_rect;
|
RECT window_rect, parent_rect;
|
||||||
|
|
Loading…
Reference in a new issue