- Gtk::Allocation a = get_allocation();
- double const width = a.get_width();
- double const height = a.get_height();
-
- cairo_t* cr = gdk_cairo_create (get_window()->gobj());
- cairo_rectangle (cr, ev->area.x, ev->area.y, ev->area.width, ev->area.height);
- cairo_clip (cr);
-
- Gdk::Color const bg = get_style()->get_bg (STATE_NORMAL);
- cairo_set_source_rgb (cr, bg.get_red_p (), bg.get_green_p (), bg.get_blue_p ());
- cairo_rectangle (cr, 0, 0, width, height);
- cairo_fill (cr);
-
- cairo_save (cr);
- cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
- Gtkmm2ext::rounded_rectangle (cr, .5, -1.5, width - 1, height + 1, 7);
- cairo_clip (cr);
- cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
-
- uint32_t ht = render_inline (cr, width);
- cairo_restore (cr);
-
- if (ht == 0) {
- hide ();
- if (_cur_height != 1) {
- _cur_height = 1;
- queue_resize ();
- }
- cairo_destroy (cr);
- return true;
- } else {
- update_height_alloc (ht);
- }
-
- bool failed = false;
- std::string name = get_name();
- ArdourCanvas::Color fill_color = UIConfiguration::instance().color (string_compose ("%1: fill active", name), &failed);
-
- Gtkmm2ext::rounded_rectangle (cr, .5, -1.5, width - 1, height + 1, 7);
- cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
- cairo_set_line_width(cr, 1.0);
- ArdourCanvas::set_source_rgb_a (cr, fill_color, 1.0);
- cairo_stroke (cr);
-
- cairo_destroy(cr);
- return true;