From 6fc4ab87dea837c733216223d75b49f4adfafa21 Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Tue, 1 Feb 2022 10:13:04 -0600 Subject: [PATCH] trigger_ui: MIDI trigger strips have a centered note-icon --- gtk2_ardour/trigger_master.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gtk2_ardour/trigger_master.cc b/gtk2_ardour/trigger_master.cc index da2d440844..e9780bbccb 100644 --- a/gtk2_ardour/trigger_master.cc +++ b/gtk2_ardour/trigger_master.cc @@ -175,6 +175,7 @@ TriggerMaster::render (ArdourCanvas::Rect const& area, Cairo::RefPtrdata_type () == ARDOUR::DataType::MIDI) { + Glib::RefPtr layout = Pango::Layout::create (context); + layout->set_font_description (UIConfiguration::instance ().get_BigBoldMonospaceFont ()); + layout->set_text ("\u266b"); + int tw, th; + layout->get_pixel_size (tw, th); + context->move_to (width / 2, height / 2); + context->rel_move_to (-tw / 2, -th / 2); + Gtkmm2ext::set_source_rgba (context, UIConfiguration::instance ().color ("neutral:foreground")); + layout->show_in_cairo_context (context); + } + if (true) { /* drop-shadow at top */ Cairo::RefPtr drop_shadow_pattern = Cairo::LinearGradient::create (0.0, 0.0, 0.0, 6 * scale);