summaryrefslogtreecommitdiff
path: root/src/Fl_Help_View.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2005-11-28 16:39:57 +0000
committerMatthias Melcher <fltk@matthiasm.com>2005-11-28 16:39:57 +0000
commitc146000f27482d3b62f2188b764f40b52fc25a9b (patch)
tree185993011d2ae2531ce034e6a493a0e8bd51b600 /src/Fl_Help_View.cxx
parent3cae272e1fd8e267053ad906a6cde737e1e031e9 (diff)
STR #1064: Added code to underline spaces in underline chunks. Also fixed wrong character code for Center Dot (bulets) on Mac OS Quartz
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4669 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Help_View.cxx')
-rw-r--r--src/Fl_Help_View.cxx19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/Fl_Help_View.cxx b/src/Fl_Help_View.cxx
index 3b930116f..83c97bcf8 100644
--- a/src/Fl_Help_View.cxx
+++ b/src/Fl_Help_View.cxx
@@ -333,7 +333,8 @@ Fl_Help_View::draw()
needspace; // Do we need whitespace?
Fl_Boxtype b = box() ? box() : FL_DOWN_BOX;
// Box to draw...
- int underline; // Underline text?
+ int underline, // Underline text?
+ xtra_ww; // Extra width for underlined space between words
// Draw the scrollbar(s) and box first...
@@ -406,8 +407,11 @@ Fl_Help_View::draw()
}
fl_draw(buf, xx + x() - leftline_, yy + y());
- if (underline) fl_xyline(xx + x() - leftline_, yy + y() + 1,
- xx + x() - leftline_ + ww);
+ if (underline) {
+ xtra_ww = isspace(*ptr)?(int)fl_width(' '):0;
+ fl_xyline(xx + x() - leftline_, yy + y() + 1,
+ xx + x() - leftline_ + ww + xtra_ww);
+ }
xx += ww;
if ((fsize + 2) > hh)
@@ -562,8 +566,13 @@ Fl_Help_View::draw()
if (strcasecmp(buf, "LI") == 0)
{
- fl_font(FL_SYMBOL, fsize);
- fl_draw("\267", xx - fsize + x() - leftline_, yy + y());
+#ifdef __APPLE_QUARTZ__
+ fl_font(FL_SYMBOL, fsize);
+ fl_draw("\245", xx - fsize + x() - leftline_, yy + y());
+#else
+ fl_font(FL_SYMBOL, fsize);
+ fl_draw("\267", xx - fsize + x() - leftline_, yy + y());
+#endif
}
pushfont(font, fsize);