if _need_bg is set to false in a CairoWidget, then don't actually draw the background
This commit is contained in:
parent
b6c4ae46d0
commit
a48684c692
@ -183,15 +183,21 @@ CairoWidget::on_expose_event (GdkEventExpose *ev)
|
||||
#endif
|
||||
|
||||
cr->rectangle (ev->area.x, ev->area.y, ev->area.width, ev->area.height);
|
||||
cr->clip_preserve ();
|
||||
|
||||
/* paint expose area the color of the parent window bg
|
||||
*/
|
||||
|
||||
Gdk::Color bg (get_parent_bg());
|
||||
|
||||
cr->set_source_rgb (bg.get_red_p(), bg.get_green_p(), bg.get_blue_p());
|
||||
cr->fill ();
|
||||
if (_need_bg) {
|
||||
cr->clip_preserve ();
|
||||
|
||||
/* paint expose area the color of the parent window bg
|
||||
*/
|
||||
|
||||
Gdk::Color bg (get_parent_bg());
|
||||
|
||||
cr->set_source_rgb (bg.get_red_p(), bg.get_green_p(), bg.get_blue_p());
|
||||
cr->fill ();
|
||||
} else {
|
||||
std::cerr << get_name() << " skipped bg fill\n";
|
||||
cr->clip ();
|
||||
}
|
||||
|
||||
cairo_rectangle_t expose_area;
|
||||
expose_area.x = ev->area.x;
|
||||
|
Loading…
Reference in New Issue
Block a user