comctl32/trackbar: Update control parts when style changed.
Fix trackbar draws incorrectly after changing style. For example, adding TBS_BOTH should cause a total repaint. Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8107462b8a
commit
6799667b71
|
@ -1502,6 +1502,19 @@ TRACKBAR_InitializeThumb (TRACKBAR_INFO *infoPtr)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void TRACKBAR_RecalculateAll (TRACKBAR_INFO *infoPtr)
|
||||||
|
{
|
||||||
|
if (infoPtr->dwStyle & TBS_FIXEDLENGTH)
|
||||||
|
{
|
||||||
|
TRACKBAR_CalcChannel(infoPtr);
|
||||||
|
TRACKBAR_UpdateThumb(infoPtr);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TRACKBAR_InitializeThumb(infoPtr);
|
||||||
|
}
|
||||||
|
TRACKBAR_AlignBuddies(infoPtr);
|
||||||
|
}
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TRACKBAR_Create (HWND hwnd, const CREATESTRUCTW *lpcs)
|
TRACKBAR_Create (HWND hwnd, const CREATESTRUCTW *lpcs)
|
||||||
|
@ -1677,14 +1690,7 @@ TRACKBAR_SetFocus (TRACKBAR_INFO *infoPtr)
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TRACKBAR_Size (TRACKBAR_INFO *infoPtr)
|
TRACKBAR_Size (TRACKBAR_INFO *infoPtr)
|
||||||
{
|
{
|
||||||
if (infoPtr->dwStyle & TBS_FIXEDLENGTH)
|
TRACKBAR_RecalculateAll(infoPtr);
|
||||||
{
|
|
||||||
TRACKBAR_CalcChannel(infoPtr);
|
|
||||||
TRACKBAR_UpdateThumb(infoPtr);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
TRACKBAR_InitializeThumb(infoPtr);
|
|
||||||
TRACKBAR_AlignBuddies (infoPtr);
|
|
||||||
TRACKBAR_InvalidateAll(infoPtr);
|
TRACKBAR_InvalidateAll(infoPtr);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1697,7 +1703,8 @@ TRACKBAR_StyleChanged (TRACKBAR_INFO *infoPtr, WPARAM wStyleType,
|
||||||
if (wStyleType != GWL_STYLE) return 0;
|
if (wStyleType != GWL_STYLE) return 0;
|
||||||
|
|
||||||
infoPtr->dwStyle = lpss->styleNew;
|
infoPtr->dwStyle = lpss->styleNew;
|
||||||
|
TRACKBAR_RecalculateAll(infoPtr);
|
||||||
|
TRACKBAR_InvalidateAll(infoPtr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue