mirror of
https://github.com/reactos/reactos.git
synced 2025-04-21 12:40:33 +00:00
[UXTHEME] -Fix the tab background pattern hack when the background pattern is smaller than the window that we are trying to paint. CORE-13147, CORE-13192.
There is still a bug where the pattern doesn't change after a theme change. svn path=/trunk/; revision=74522
This commit is contained in:
parent
3305b84402
commit
e4832e1f99
1 changed files with 4 additions and 5 deletions
|
@ -312,14 +312,13 @@ HRESULT GetDiaogTextureBrush(HTHEME theme, HWND hwnd, HDC hdc, HBRUSH* result, B
|
||||||
{
|
{
|
||||||
/* Unfortunately SetBrushOrgEx doesn't work at all */
|
/* Unfortunately SetBrushOrgEx doesn't work at all */
|
||||||
RECT rcWindow, rcParent;
|
RECT rcWindow, rcParent;
|
||||||
POINT pt;
|
UINT y;
|
||||||
HDC hdcPattern, hdcHackPattern;
|
HDC hdcPattern, hdcHackPattern;
|
||||||
HBITMAP hbmpOld1, hbmpold2, hbmpHack;
|
HBITMAP hbmpOld1, hbmpold2, hbmpHack;
|
||||||
|
|
||||||
GetWindowRect(hwnd, &rcWindow);
|
GetWindowRect(hwnd, &rcWindow);
|
||||||
GetWindowRect(GetParent(hwnd), &rcParent);
|
GetWindowRect(GetParent(hwnd), &rcParent);
|
||||||
pt.x = rcWindow.left - rcParent.left;
|
y = (rcWindow.top - rcParent.top) % bmpRect.bottom;
|
||||||
pt.y = rcWindow.top - rcParent.top;
|
|
||||||
|
|
||||||
hdcPattern = CreateCompatibleDC(hdc);
|
hdcPattern = CreateCompatibleDC(hdc);
|
||||||
hbmpOld1 = (HBITMAP)SelectObject(hdcPattern, hbmp);
|
hbmpOld1 = (HBITMAP)SelectObject(hdcPattern, hbmp);
|
||||||
|
@ -328,8 +327,8 @@ HRESULT GetDiaogTextureBrush(HTHEME theme, HWND hwnd, HDC hdc, HBRUSH* result, B
|
||||||
hbmpHack = CreateCompatibleBitmap(hdc, bmpRect.right, bmpRect.bottom);
|
hbmpHack = CreateCompatibleBitmap(hdc, bmpRect.right, bmpRect.bottom);
|
||||||
hbmpold2 = (HBITMAP)SelectObject(hdcHackPattern, hbmpHack);
|
hbmpold2 = (HBITMAP)SelectObject(hdcHackPattern, hbmpHack);
|
||||||
|
|
||||||
BitBlt(hdcHackPattern, 0, 0, bmpRect.right, bmpRect.bottom - pt.y, hdcPattern, 0, pt.y, SRCCOPY);
|
BitBlt(hdcHackPattern, 0, 0, bmpRect.right, bmpRect.bottom - y, hdcPattern, 0, y, SRCCOPY);
|
||||||
BitBlt(hdcHackPattern, 0, bmpRect.bottom - pt.y, bmpRect.right, pt.y, hdcPattern, 0, 0, SRCCOPY);
|
BitBlt(hdcHackPattern, 0, bmpRect.bottom - y, bmpRect.right, y, hdcPattern, 0, 0, SRCCOPY);
|
||||||
|
|
||||||
hbmpold2 = (HBITMAP)SelectObject(hdcHackPattern, hbmpold2);
|
hbmpold2 = (HBITMAP)SelectObject(hdcHackPattern, hbmpold2);
|
||||||
hbmpOld1 = (HBITMAP)SelectObject(hdcPattern, hbmpOld1);
|
hbmpOld1 = (HBITMAP)SelectObject(hdcPattern, hbmpOld1);
|
||||||
|
|
Loading…
Reference in a new issue