From 92732f1bcfaa008774f21abcb01f9064ada0ca48 Mon Sep 17 00:00:00 2001 From: Giannis Adamopoulos Date: Wed, 10 Jan 2018 13:42:53 +0200 Subject: [PATCH] [COMCTL32] rebar: Use DrawThemeText when drawing text with themes. CORE-13855 --- dll/win32/comctl32/rebar.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dll/win32/comctl32/rebar.c b/dll/win32/comctl32/rebar.c index 4912b88264f..525c4cc524b 100644 --- a/dll/win32/comctl32/rebar.c +++ b/dll/win32/comctl32/rebar.c @@ -612,8 +612,16 @@ REBAR_DrawBand (HDC hdc, const REBAR_INFO *infoPtr, REBAR_BAND *lpBand) lpBand->clrFore; oldcolor = SetTextColor (hdc, new); } - DrawTextW (hdc, lpBand->lpText, -1, &lpBand->rcCapText, - DT_CENTER | DT_VCENTER | DT_SINGLELINE); + + if (!theme) + { + DrawTextW (hdc, lpBand->lpText, -1, &lpBand->rcCapText, DT_CENTER | DT_VCENTER | DT_SINGLELINE); + } + else + { + DrawThemeText(theme, hdc, 0, 0, lpBand->lpText, -1, DT_CENTER | DT_VCENTER | DT_SINGLELINE, 0, &lpBand->rcCapText); + } + if (oldBkMode != TRANSPARENT) SetBkMode (hdc, oldBkMode); if (lpBand->clrFore != CLR_NONE)