[PATCH 5/5] riched20: Draw the paragraph numbering text in the correct colour.

Huw Davies huw at codeweavers.com
Wed Oct 12 06:58:53 CDT 2016


Signed-off-by: Huw Davies <huw at codeweavers.com>
---
 dlls/riched20/paint.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c
index 7c17513..b76f533 100644
--- a/dlls/riched20/paint.c
+++ b/dlls/riched20/paint.c
@@ -903,16 +903,19 @@ static void draw_para_number( ME_Context *c, ME_DisplayItem *p )
     ME_Paragraph *para = &p->member.para;
     HFONT old_font;
     int x, y;
+    COLORREF old_text;
 
     if (para->fmt.wNumbering)
     {
         old_font = ME_SelectStyleFont( c, para->para_num.style );
+        old_text = SetTextColor( c->hDC, get_text_color( c, para->para_num.style, FALSE ) );
 
         x = c->pt.x + para->para_num.pt.x;
         y = c->pt.y + para->pt.y + para->para_num.pt.y;
 
         ExtTextOutW( c->hDC, x, y, 0, NULL, para->para_num.text->szData, para->para_num.text->nLen, NULL );
 
+        SetTextColor( c->hDC, old_text );
         ME_UnselectStyleFont( c, para->para_num.style, old_font );
     }
 }
-- 
2.8.2




More information about the wine-patches mailing list