diff options
author | corvid <corvid@lavabit.com> | 2010-04-21 03:46:20 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2010-04-21 03:46:20 +0000 |
commit | be6a1b63cc3b6f8264e2e99412597dc63e9553c5 (patch) | |
tree | c5d822c1966edfb7503b54e79935b10205e3f38e /dw/textblock.cc | |
parent | b6336662350d0cc14bfc1172126b04cf8190df47 (diff) |
draw background for all Words, not just text
Diffstat (limited to 'dw/textblock.cc')
-rw-r--r-- | dw/textblock.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc index cc743252..4b4d0c08 100644 --- a/dw/textblock.cc +++ b/dw/textblock.cc @@ -1248,12 +1248,6 @@ void Textblock::drawText(int wordIndex, core::View *view,core::Rectangle *area, } yWorldBase = yWidgetBase + allocation.y; - /* Draw background (color, image), when given. */ - if (style->hasBackground ()) - drawBox ( - view, style, area, xWidget, yWidgetBase - style->font->ascent, - word->size.width, style->font->ascent + style->font->descent, false); - view->drawText (style->font, style->color, core::style::Color::SHADING_NORMAL, xWorld, yWorldBase, word->content.text, strlen (word->content.text)); @@ -1395,6 +1389,11 @@ void Textblock::drawLine (Line *line, core::View *view, core::Rectangle *area) word->content.type == core::Content::WIDGET) { if (word->size.width > 0) { + if (word->style->hasBackground ()) { + drawBox (view, word->style, area, xWidget, + yWidgetBase - line->boxAscent, word->size.width, + line->boxAscent + line->boxDescent, false); + } if (word->content.type == core::Content::WIDGET) { core::Widget *child = word->content.widget; core::Rectangle childArea; |