Author: gadamopoulos Date: Sat Jul 29 09:43:48 2017 New Revision: 75439
URL: http://svn.reactos.org/svn/reactos?rev=75439&view=rev Log: [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
Modified: trunk/reactos/dll/win32/uxtheme/nonclient.c
Modified: trunk/reactos/dll/win32/uxtheme/nonclient.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/nonclient... ============================================================================== --- trunk/reactos/dll/win32/uxtheme/nonclient.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/uxtheme/nonclient.c [iso-8859-1] Sat Jul 29 09:43:48 2017 @@ -305,6 +305,7 @@
static void ThemeDrawCaptionButton(PDRAW_CONTEXT pcontext, + RECT* prcCurrent, CAPTIONBUTTON buttonId, INT iStateId) { @@ -347,6 +348,9 @@ //FIXME: Implement Help Button return; } + + if (prcCurrent) + prcCurrent->right = pwndData->rcCaptionButtons[buttonId].left;
DrawThemeBackground(pcontext->theme, pcontext->hDC, iPartId, iStateId, &pwndData->rcCaptionButtons[buttonId], NULL); } @@ -369,13 +373,13 @@ 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 @@ { 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 ;