Mercurial > dillo_port1.3
changeset 1655:3e01d83fd6d1
draw background for all Words, not just text
author | corvid <corvid@lavabit.com> |
---|---|
date | Wed, 21 Apr 2010 03:46:20 +0000 |
parents | d82939c7c4e8 |
children | 0b01d120294c |
files | dw/textblock.cc |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/dw/textblock.cc Tue Apr 20 19:40:39 2010 +0000 +++ b/dw/textblock.cc Wed Apr 21 03:46:20 2010 +0000 @@ -1248,12 +1248,6 @@ } 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 @@ 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;