draw LED background with same style as parent window; less debugging

git-svn-id: svn://localhost/ardour2/branches/3.0@7070 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2010-05-06 02:48:59 +00:00
parent c52a0d1efc
commit e1ed9467dc
3 changed files with 17 additions and 13 deletions

View File

@ -52,21 +52,28 @@ LED::render (cairo_t* cr)
//background
RefPtr<Style> style = get_style();
Widget* parent;
RefPtr<Style> style;
Color c;
switch (_visual_state) {
case 0:
c = style->get_bg (STATE_NORMAL);
break;
default:
c = style->get_bg (STATE_ACTIVE);
break;
parent = get_parent ();
while (parent && !parent->get_has_window()) {
parent = parent->get_parent();
}
if (parent && parent->get_has_window()) {
style = parent->get_style ();
c = style->get_bg (parent->get_state());
} else {
style = get_style ();
c = style->get_bg (get_state());
}
cairo_rectangle(cr, 0, 0, _width, _height);
cairo_stroke_preserve(cr);
cairo_set_source_rgb(cr, c.get_green_p(), c.get_red_p(), c.get_blue_p());
cairo_set_source_rgb(cr, c.get_red_p(), c.get_green_p(), c.get_blue_p());
cairo_fill(cr);
cairo_translate(cr, _width/2, _height/2);

View File

@ -818,7 +818,6 @@ RouteUI::update_solo_display ()
set_button_names ();
if (solo_isolated_led) {
cerr << _route->name() << " reset iso vis = " << (_route->solo_isolated() ? 1 : 0) << endl;
solo_isolated_led->set_visual_state (_route->solo_isolated() ? 1 : 0);
}

View File

@ -696,8 +696,6 @@ Route::set_solo_isolated (bool yn, void *src)
_route_group->apply (&Route::set_solo_isolated, yn, _route_group);
return;
}
cerr << name() << " SET SOLO ISO " << yn << " cur = " << _solo_isolated << endl;
/* forward propagate solo-isolate status to everything fed by this route, but not those via sends only */