Huw Davies : riched20: Draw the paragraph numbering text in the correct colour.

Alexandre Julliard julliard at winehq.org
Wed Oct 12 16:06:16 CDT 2016


Module: wine
Branch: master
Commit: 9d248938ed0f88f408f86250769c0119d6d45632
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9d248938ed0f88f408f86250769c0119d6d45632

Author: Huw Davies <huw at codeweavers.com>
Date:   Wed Oct 12 12:58:53 2016 +0100

riched20: Draw the paragraph numbering text in the correct colour.

Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 );
     }
 }




More information about the wine-cvs mailing list