Commit 4d0bad87 authored by Mikołaj Zalewski's avatar Mikołaj Zalewski Committed by Alexandre Julliard

comctl32: rebar: To check if an image is present iImage should be compared to -1 (with testcase).

parent ecde1c3c
......@@ -1572,7 +1572,7 @@ REBAR_ValidateBand (const REBAR_INFO *infoPtr, REBAR_BAND *lpBand)
}
/* image is visible */
if ((lpBand->fMask & RBBIM_IMAGE) && (infoPtr->himl)) {
if (lpBand->iImage != -1 && (infoPtr->himl)) {
lpBand->fStatus |= HAS_IMAGE;
if (infoPtr->dwStyle & CCS_VERT) {
header += (infoPtr->imageSize.cy + REBAR_POST_IMAGE);
......
......@@ -261,6 +261,16 @@ rbsize_result_t rbsize_results[] = {
{ {328, 0, 511, 28}, 0x00, 183}, { {511, 0, 672, 28}, 0x00, 161},
{ { 0, 28, 672, 56}, 0x00, 200},
}, },
{ {0, 0, 672, 40}, 40, 2, {20, 20, }, 5, {
{ { 0, 0, 114, 20}, 0x00, 40}, { {114, 0, 328, 20}, 0x00, 214},
{ {328, 0, 511, 20}, 0x00, 183}, { {511, 0, 672, 20}, 0x00, 161},
{ { 0, 20, 672, 40}, 0x00, 200},
}, },
{ {0, 0, 672, 56}, 56, 2, {28, 28, }, 5, {
{ { 0, 0, 114, 28}, 0x00, 40}, { {114, 0, 328, 28}, 0x00, 214},
{ {328, 0, 511, 28}, 0x00, 183}, { {511, 0, 672, 28}, 0x00, 161},
{ { 0, 28, 672, 56}, 0x00, 200},
}, },
{ {0, 0, 672, 0}, 0, 0, {0, }, 0, {{{0, 0, 0, 0}, 0, 0},
}, },
{ {0, 0, 672, 65}, 65, 1, {65, }, 3, {
......@@ -428,6 +438,16 @@ static void layout_test(void)
SendMessage(hRebar, RB_SETBANDINFO, 1, (LPARAM)&rbi);
check_sizes();
/* after removing it everything is back to normal*/
rbi.iImage = -1;
SendMessage(hRebar, RB_SETBANDINFO, 1, (LPARAM)&rbi);
check_sizes();
/* Only -1 means that the image is not present. Other invalid values increase the height */
rbi.iImage = -2;
SendMessage(hRebar, RB_SETBANDINFO, 1, (LPARAM)&rbi);
check_sizes();
/* VARHEIGHT resizing test on a horizontal rebar */
rebuild_rebar(&hRebar);
SetWindowLong(hRebar, GWL_STYLE, GetWindowLong(hRebar, GWL_STYLE) | RBS_AUTOSIZE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment