Commit 9b83d4d4 authored by Ulrich Czekalla's avatar Ulrich Czekalla Committed by Alexandre Julliard

Fix rebar band insertion and non-client calculation in pager control.

parent fc6fbd01
...@@ -1674,7 +1674,7 @@ REBAR_Layout (REBAR_INFO *infoPtr, LPRECT lpRect, BOOL notify, BOOL resetclient) ...@@ -1674,7 +1674,7 @@ REBAR_Layout (REBAR_INFO *infoPtr, LPRECT lpRect, BOOL notify, BOOL resetclient)
#if PROBLEM2 #if PROBLEM2
(x < adjcx) : (y < adjcy) (x < adjcx) : (y < adjcy)
#else #else
(adjcx - x > 4) : (adjcy - y > 4) (adjcx - x > 5) : (adjcy - y > 4)
#endif #endif
) && ) &&
(infoPtr->uNumBands > 1)) { (infoPtr->uNumBands > 1)) {
...@@ -3204,9 +3204,9 @@ REBAR_InsertBandW (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam) ...@@ -3204,9 +3204,9 @@ REBAR_InsertBandW (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
} }
/* post copy */ /* post copy */
if (uIndex < infoPtr->uNumBands - 1) { if (uIndex <= infoPtr->uNumBands - 1) {
memcpy (&infoPtr->bands[uIndex+1], &oldBands[uIndex], memcpy (&infoPtr->bands[uIndex+1], &oldBands[uIndex],
(infoPtr->uNumBands - uIndex - 1) * sizeof(REBAR_BAND)); (infoPtr->uNumBands - uIndex) * sizeof(REBAR_BAND));
} }
Free (oldBands); Free (oldBands);
...@@ -3238,7 +3238,7 @@ REBAR_InsertBandW (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam) ...@@ -3238,7 +3238,7 @@ REBAR_InsertBandW (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
REBAR_ValidateBand (infoPtr, lpBand); REBAR_ValidateBand (infoPtr, lpBand);
/* On insert of second band, revalidate band 1 to possible add gripper */ /* On insert of second band, revalidate band 1 to possible add gripper */
if (infoPtr->uNumBands == 2) if (infoPtr->uNumBands == 2)
REBAR_ValidateBand (infoPtr, &infoPtr->bands[0]); REBAR_ValidateBand (infoPtr, &infoPtr->bands[uIndex ? 0 : 1]);
REBAR_DumpBand (infoPtr); REBAR_DumpBand (infoPtr);
......
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