STR#890 fix attempt: correct imbricATED font color handling.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@6628 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Fabien Costantini 2009-01-12 17:14:52 +00:00
parent 4cfa43da56
commit d156955e85
1 changed files with 4 additions and 2 deletions

View File

@ -472,7 +472,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() ;
@ -741,7 +741,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) {
@ -768,6 +769,7 @@ Fl_Help_View::draw()
}
else if (strcasecmp(buf, "/FONT") == 0)
{
textcolor_ = prev_text_color;
fl_color(textcolor_);
popfont(font, fsize);
}