diff options
author | corvid <corvid@lavabit.com> | 2009-02-11 15:23:55 -0300 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2009-02-11 15:23:55 -0300 |
commit | f65de3e6b2f8accbac3a8bba3e73370e5a95eac9 (patch) | |
tree | 9a84aa9bb6c6eb1c4095b275ac1f248a2c6d2145 | |
parent | bc26fde9419c305ffc8e2bf69086d3d74bad23d7 (diff) |
Fix for e28cf4b71832 (highlight starting with space)
-rw-r--r-- | dw/textblock.cc | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc index 8849483c..f7722559 100644 --- a/dw/textblock.cc +++ b/dw/textblock.cc @@ -1369,21 +1369,6 @@ void Textblock::drawLine (Line *line, core::View *view, core::Rectangle *area) yWorldBase + diff - word->style->font->ascent, widthHL, word->style->font->ascent + word->style->font->descent); - if (widthHLSpace > 0) { - core::style::Color *spaceBgColor; - - if (!(spaceBgColor = word->spaceStyle->backgroundColor)) - spaceBgColor = thisBgColor; - - view->drawRectangle ( - spaceBgColor, - core::style::Color::SHADING_INVERSE, - true, startHL + widthHL, - yWorldBase + spaceDiff -word->spaceStyle->font->ascent, - widthHLSpace, - word->spaceStyle->font->ascent + - word->spaceStyle->font->descent); - } /* Highlight the text. */ view->drawText (word->style->font, color, core::style::Color::SHADING_INVERSE, @@ -1395,12 +1380,27 @@ void Textblock::drawLine (Line *line, core::View *view, core::Rectangle *area) decorateText(view, word, word->style, core::style::Color::SHADING_INVERSE, startHL, yWorldBase + diff, widthHL); + } + if (widthHLSpace > 0) { + core::style::Color *spaceBgColor; + + if (!(spaceBgColor = word->spaceStyle->backgroundColor)) + spaceBgColor = thisBgColor; - if (widthHLSpace && word->spaceStyle->textDecoration) + view->drawRectangle ( + spaceBgColor, + core::style::Color::SHADING_INVERSE, + true, startHL + widthHL, + yWorldBase + spaceDiff -word->spaceStyle->font->ascent, + widthHLSpace, + word->spaceStyle->font->ascent + + word->spaceStyle->font->descent); + if (word->spaceStyle->textDecoration) { decorateText(view, word, word->spaceStyle, core::style::Color::SHADING_INVERSE, startHL + widthHL, yWorldBase + spaceDiff, widthHLSpace); + } } } } |