[UXTHEME] -Fix for the 3rd or 4th time the bug where the caption window overflows over the caption buttons which was last broken by me in 74960. CORE-13435

svn path=/trunk/; revision=75439
This commit is contained in:
Giannis Adamopoulos 2017-07-29 09:43:48 +00:00
parent 8215152588
commit fd3b42b706

View file

@ -305,6 +305,7 @@ void ThemeCalculateCaptionButtonsPos(HWND hWnd, HTHEME htheme)
static void
ThemeDrawCaptionButton(PDRAW_CONTEXT pcontext,
RECT* prcCurrent,
CAPTIONBUTTON buttonId,
INT iStateId)
{
@ -348,6 +349,9 @@ ThemeDrawCaptionButton(PDRAW_CONTEXT pcontext,
return;
}
if (prcCurrent)
prcCurrent->right = pwndData->rcCaptionButtons[buttonId].left;
DrawThemeBackground(pcontext->theme, pcontext->hDC, iPartId, iStateId, &pwndData->rcCaptionButtons[buttonId], NULL);
}
@ -369,13 +373,13 @@ static void
ThemeDrawCaptionButtons(PDRAW_CONTEXT pcontext, DWORD htHot, DWORD htDown)
{
/* Draw the buttons */
ThemeDrawCaptionButton(pcontext, CLOSEBUTTON,
ThemeDrawCaptionButton(pcontext, NULL, CLOSEBUTTON,
ThemeGetButtonState(HTCLOSE, htHot, htDown, pcontext->Active));
ThemeDrawCaptionButton(pcontext, MAXBUTTON,
ThemeDrawCaptionButton(pcontext, NULL, MAXBUTTON,
ThemeGetButtonState(HTMAXBUTTON, htHot, htDown, pcontext->Active));
ThemeDrawCaptionButton(pcontext, MINBUTTON,
ThemeDrawCaptionButton(pcontext, NULL, MINBUTTON,
ThemeGetButtonState(HTMINBUTTON, htHot, htDown, pcontext->Active));
ThemeDrawCaptionButton(pcontext, HELPBUTTON,
ThemeDrawCaptionButton(pcontext, NULL, HELPBUTTON,
ThemeGetButtonState(HTHELP, htHot, htDown, pcontext->Active));
}
@ -421,10 +425,10 @@ ThemeDrawCaption(PDRAW_CONTEXT pcontext, RECT* prcCurrent)
{
iState = pcontext->Active ? BUTTON_NORMAL : BUTTON_INACTIVE;
ThemeDrawCaptionButton(pcontext, CLOSEBUTTON, iState);
ThemeDrawCaptionButton(pcontext, MAXBUTTON, iState);
ThemeDrawCaptionButton(pcontext, MINBUTTON, iState);
ThemeDrawCaptionButton(pcontext, HELPBUTTON, iState);
ThemeDrawCaptionButton(pcontext, &rcPart, CLOSEBUTTON, iState);
ThemeDrawCaptionButton(pcontext, &rcPart, MAXBUTTON, iState);
ThemeDrawCaptionButton(pcontext, &rcPart, MINBUTTON, iState);
ThemeDrawCaptionButton(pcontext, &rcPart, HELPBUTTON, iState);
}
rcPart.top += 3 ;