On Wed, Apr 21, 2010 at 05:01:11AM +0000, corvid wrote:
Is this anywhere near correct?
It is definately better than what we have now, but somehow this image background handling is a bit of a hack all together. Basically the Image Widget should get the background color via Widget::getBgColor() at drawing time. That would avoid any special handling in html.cc and would allow to modify the background color by setting a different style. However I can't see any easy way to achive this atm.
(This at least makes the background colors right for the rounded-corner images on the top row of links at fltk.org. Of course it still looks funny because valign top isn't obeyed...)
diff -r 3e01d83fd6d1 src/html.cc --- a/src/html.cc Wed Apr 21 03:46:20 2010 +0000 +++ b/src/html.cc Wed Apr 21 04:52:00 2010 +0000 @@ -2119,7 +2119,10 @@
/* Add a new image widget to this page */ Image = a_Image_new(alt_ptr, 0); - if (HT2TB(html)->getBgColor()) + + if (html->styleEngine->style()->backgroundColor) + Image->bg_color =html->styleEngine->style()->backgroundColor->getColor(); + else if (HT2TB(html)->getBgColor()) Image->bg_color = HT2TB(html)->getBgColor()->getColor();
load_now = prefs.load_images ||
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev