Module: wine Branch: stable Commit: efba3dfa748caf34bc5ca9836b10f3c5f5e6e288 URL: https://source.winehq.org/git/wine.git/?a=commit;h=efba3dfa748caf34bc5ca9836...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Sun Aug 12 22:40:00 2018 +0300
comctl32: Fix background and text color for DrawStatusText().
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org (cherry picked from commit 824837ec2c223d651d4ebb724b418fc4506d6d0b) Signed-off-by: Michael Stefaniuc mstefani@winehq.org
---
dlls/comctl32/commctrl.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index d3ba314..4af2381 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c @@ -431,20 +431,24 @@ void WINAPI DrawStatusTextW (HDC hdc, LPCRECT lprc, LPCWSTR text, UINT style) { RECT r = *lprc; UINT border = BDR_SUNKENOUTER; + COLORREF oldbkcolor;
if (style & SBT_POPOUT) border = BDR_RAISEDOUTER; else if (style & SBT_NOBORDERS) border = 0;
- DrawEdge (hdc, &r, border, BF_RECT|BF_ADJUST); + oldbkcolor = SetBkColor (hdc, comctl32_color.clrBtnFace); + DrawEdge (hdc, &r, border, BF_MIDDLE|BF_RECT|BF_ADJUST);
/* now draw text */ if (text) { int oldbkmode = SetBkMode (hdc, TRANSPARENT); + COLORREF oldtextcolor; UINT align = DT_LEFT; int strCnt = 0;
+ oldtextcolor = SetTextColor (hdc, comctl32_color.clrBtnText); if (style & SBT_RTLREADING) FIXME("Unsupported RTL style!\n"); r.left += 3; @@ -464,8 +468,11 @@ void WINAPI DrawStatusTextW (HDC hdc, LPCRECT lprc, LPCWSTR text, UINT style) } while(*text++);
if (strCnt) DrawTextW (hdc, text - strCnt, -1, &r, align|DT_VCENTER|DT_SINGLELINE|DT_NOPREFIX); - SetBkMode(hdc, oldbkmode); + SetBkMode (hdc, oldbkmode); + SetTextColor (hdc, oldtextcolor); } + + SetBkColor (hdc, oldbkcolor); }