diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2006-11-15 04:29:45 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2006-11-15 04:29:45 +0000 |
| commit | 839ac664018d15b64a99a0acdd6abaa322b737f4 (patch) | |
| tree | a2417bfbb2096ac7c5f5d3691d1a4d2609302a13 /src | |
| parent | 0789a8a18e999cd56d278fa5f1fcf5f9e9ca7c36 (diff) | |
Fix text alignment - wasn't resetting the default alignment after
closing a table cell...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5545 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Help_View.cxx | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/src/Fl_Help_View.cxx b/src/Fl_Help_View.cxx index 8ec3f044d..2fcc5b41a 100644 --- a/src/Fl_Help_View.cxx +++ b/src/Fl_Help_View.cxx @@ -1287,6 +1287,7 @@ Fl_Help_View::format() strcasecmp(buf, "TABLE") == 0) { block->end = start; + newalign = strcasecmp(buf, "CENTER") ? LEFT : CENTER; line = do_align(block, line, xx, newalign, links); xx = block->x; block->h += hh; @@ -1496,6 +1497,7 @@ Fl_Help_View::format() line = do_align(block, line, xx, newalign, links); block->end = start; block->h += hh; + talign = LEFT; xx = blocks_[row].x; @@ -1578,33 +1580,34 @@ Fl_Help_View::format() strcasecmp(buf, "/TH") == 0) && row) { popfont(font, fsize); + talign = LEFT; } - else if (strcasecmp(buf, "FONT") == 0) - { - if (get_attr(attrs, "FACE", attr, sizeof(attr)) != NULL) { - if (!strncasecmp(attr, "helvetica", 9) || - !strncasecmp(attr, "arial", 5) || - !strncasecmp(attr, "sans", 4)) font = FL_HELVETICA; - else if (!strncasecmp(attr, "times", 5) || - !strncasecmp(attr, "serif", 5)) font = FL_TIMES; - else if (!strncasecmp(attr, "symbol", 6)) font = FL_SYMBOL; - else font = FL_COURIER; - } + else if (strcasecmp(buf, "FONT") == 0) + { + if (get_attr(attrs, "FACE", attr, sizeof(attr)) != NULL) { + if (!strncasecmp(attr, "helvetica", 9) || + !strncasecmp(attr, "arial", 5) || + !strncasecmp(attr, "sans", 4)) font = FL_HELVETICA; + else if (!strncasecmp(attr, "times", 5) || + !strncasecmp(attr, "serif", 5)) font = FL_TIMES; + else if (!strncasecmp(attr, "symbol", 6)) font = FL_SYMBOL; + else font = FL_COURIER; + } - if (get_attr(attrs, "SIZE", attr, sizeof(attr)) != NULL) { - if (isdigit(attr[0] & 255)) { - // Absolute size - fsize = (int)(textsize_ * pow(1.2, atoi(attr) - 3.0)); - } else { - // Relative size - fsize = (int)(fsize * pow(1.2, atoi(attr))); - } + if (get_attr(attrs, "SIZE", attr, sizeof(attr)) != NULL) { + if (isdigit(attr[0] & 255)) { + // Absolute size + fsize = (int)(textsize_ * pow(1.2, atoi(attr) - 3.0)); + } else { + // Relative size + fsize = (int)(fsize * pow(1.2, atoi(attr))); } - - pushfont(font, fsize); } - else if (strcasecmp(buf, "/FONT") == 0) - popfont(font, fsize); + + pushfont(font, fsize); + } + else if (strcasecmp(buf, "/FONT") == 0) + popfont(font, fsize); else if (strcasecmp(buf, "B") == 0 || strcasecmp(buf, "STRONG") == 0) pushfont(font |= FL_BOLD, fsize); |
