From 43d5a9de5547f549714fdc0b733fc2f8e7205c85 Mon Sep 17 00:00:00 2001 From: Fabien Costantini Date: Mon, 12 Jan 2009 17:24:44 +0000 Subject: STR#890 fix attempt: correct imbricated font color handling. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6630 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Help_View.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Fl_Help_View.cxx b/src/Fl_Help_View.cxx index 46b0fd1da..f38e65820 100644 --- a/src/Fl_Help_View.cxx +++ b/src/Fl_Help_View.cxx @@ -451,7 +451,7 @@ Fl_Help_View::draw() // Box to draw... int underline, // Underline text? xtra_ww; // Extra width for underlined space between words - + Fl_Color prev_text_color=FL_RED; // Saved text color before font color modification // Draw the scrollbar(s) and box first... ww = w() ; @@ -720,7 +720,8 @@ Fl_Help_View::draw() else if (strcasecmp(buf, "FONT") == 0) { if (get_attr(attrs, "COLOR", attr, sizeof(attr)) != NULL) { - fl_color(get_color(attr, textcolor_)); + prev_text_color = textcolor_; + fl_color( (textcolor_ = get_color(attr, textcolor_)) ); } if (get_attr(attrs, "FACE", attr, sizeof(attr)) != NULL) { @@ -747,6 +748,7 @@ Fl_Help_View::draw() } else if (strcasecmp(buf, "/FONT") == 0) { + textcolor_ = prev_text_color; fl_color(textcolor_); popfont(font, fsize); } -- cgit v1.2.3