mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 15:34:50 +00:00
uxtheme: Do not draw parent background even if scrollbar arrows and thumb are transparent.
This is confirmed by the tests in test_scrollbar() and manual tests on XP. Even though scrollbar
arrows and thumb are in fact transparent, DrawThemeParentBackground() is not called to paint the
parent background, leaving the transparent area untouched. On Windows, even if the scrollbar arrows
are reported to be transparent, the bitmaps for arrow parts in the stock themes are in fact opaque.
Fix Ice Cream Calculator slow scrolling after 4cb229a
because the WM_PRINTCLIENT handling in the
application is slow.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53337
This commit is contained in:
parent
cf4c4d2f25
commit
b9c882a127
|
@ -887,7 +887,7 @@ static void test_themed_background(void)
|
|||
{TRACKBAR_CLASSA, 0, wm_ctlcolorstatic_seq},
|
||||
{WC_TREEVIEWA, 0, treeview_seq},
|
||||
{UPDOWN_CLASSA, 0, empty_seq},
|
||||
{WC_SCROLLBARA, 0, scrollbar_seq, TRUE},
|
||||
{WC_SCROLLBARA, 0, scrollbar_seq},
|
||||
{WC_SCROLLBARA, SBS_SIZEBOX, empty_seq},
|
||||
{WC_SCROLLBARA, SBS_SIZEGRIP, empty_seq},
|
||||
/* Scrollbars in non-client area */
|
||||
|
|
|
@ -138,14 +138,10 @@ void WINAPI UXTHEME_ScrollBarDraw(HWND hwnd, HDC dc, INT bar, enum SCROLL_HITTES
|
|||
|
||||
partrect = *rect;
|
||||
partrect.bottom = partrect.top + arrowsize;
|
||||
if (bar == SB_CTL && IsThemeBackgroundPartiallyTransparent(theme, SBP_ARROWBTN, uparrowstate))
|
||||
DrawThemeParentBackground(hwnd, dc, &partrect);
|
||||
DrawThemeBackground(theme, dc, SBP_ARROWBTN, uparrowstate, &partrect, NULL);
|
||||
|
||||
partrect.bottom = rect->bottom;
|
||||
partrect.top = partrect.bottom - arrowsize;
|
||||
if (bar == SB_CTL && IsThemeBackgroundPartiallyTransparent(theme, SBP_ARROWBTN, downarrowstate))
|
||||
DrawThemeParentBackground(hwnd, dc, &partrect);
|
||||
DrawThemeBackground(theme, dc, SBP_ARROWBTN, downarrowstate, &partrect, NULL);
|
||||
|
||||
if (thumbpos > 0) {
|
||||
|
@ -161,9 +157,6 @@ void WINAPI UXTHEME_ScrollBarDraw(HWND hwnd, HDC dc, INT bar, enum SCROLL_HITTES
|
|||
if (thumbsize > 0) {
|
||||
partrect.top = rect->top + thumbpos;
|
||||
partrect.bottom = partrect.top + thumbsize;
|
||||
|
||||
if (bar == SB_CTL && IsThemeBackgroundPartiallyTransparent(theme, SBP_THUMBBTNVERT, thumbstate))
|
||||
DrawThemeParentBackground(hwnd, dc, &partrect);
|
||||
DrawThemeBackground(theme, dc, SBP_THUMBBTNVERT, thumbstate, &partrect, NULL);
|
||||
|
||||
if (SUCCEEDED(GetThemePartSize(theme, dc, SBP_GRIPPERVERT, thumbstate, NULL, TS_DRAW, &grippersize))) {
|
||||
|
@ -217,14 +210,10 @@ void WINAPI UXTHEME_ScrollBarDraw(HWND hwnd, HDC dc, INT bar, enum SCROLL_HITTES
|
|||
|
||||
partrect = *rect;
|
||||
partrect.right = partrect.left + arrowsize;
|
||||
if (bar == SB_CTL && IsThemeBackgroundPartiallyTransparent(theme, SBP_ARROWBTN, leftarrowstate))
|
||||
DrawThemeParentBackground(hwnd, dc, &partrect);
|
||||
DrawThemeBackground(theme, dc, SBP_ARROWBTN, leftarrowstate, &partrect, NULL);
|
||||
|
||||
partrect.right = rect->right;
|
||||
partrect.left = partrect.right - arrowsize;
|
||||
if (bar == SB_CTL && IsThemeBackgroundPartiallyTransparent(theme, SBP_ARROWBTN, rightarrowstate))
|
||||
DrawThemeParentBackground(hwnd, dc, &partrect);
|
||||
DrawThemeBackground(theme, dc, SBP_ARROWBTN, rightarrowstate, &partrect, NULL);
|
||||
|
||||
if (thumbpos > 0) {
|
||||
|
@ -240,9 +229,6 @@ void WINAPI UXTHEME_ScrollBarDraw(HWND hwnd, HDC dc, INT bar, enum SCROLL_HITTES
|
|||
if (thumbsize > 0) {
|
||||
partrect.left = rect->left + thumbpos;
|
||||
partrect.right = partrect.left + thumbsize;
|
||||
|
||||
if (bar == SB_CTL && IsThemeBackgroundPartiallyTransparent(theme, SBP_THUMBBTNHORZ, thumbstate))
|
||||
DrawThemeParentBackground(hwnd, dc, &partrect);
|
||||
DrawThemeBackground(theme, dc, SBP_THUMBBTNHORZ, thumbstate, &partrect, NULL);
|
||||
|
||||
if (SUCCEEDED(GetThemePartSize(theme, dc, SBP_GRIPPERHORZ, thumbstate, NULL, TS_DRAW, &grippersize))) {
|
||||
|
|
Loading…
Reference in a new issue