From a5e0f1ff10cb1bdc0f910ff5c6f0e08c667aed4c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 5 Jan 2017 22:22:05 +0000 Subject: [PATCH] make entire transport bar have its own background, specifically themeable --- gtk2_ardour/ardour_ui2.cc | 14 +++++++++++++- gtk2_ardour/clearlooks.rc.in | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc index 41521341a5..78b74a4cfe 100644 --- a/gtk2_ardour/ardour_ui2.cc +++ b/gtk2_ardour/ardour_ui2.cc @@ -458,10 +458,22 @@ ARDOUR_UI::setup_transport () transport_table.set_spacings (0); transport_table.set_row_spacings (4); transport_table.set_border_width (2); - transport_frame.add (transport_table); + transport_frame.set_name ("TransportFrame"); transport_frame.set_shadow_type (Gtk::SHADOW_NONE); + /* An event box to hold the table. We use this because we want specific + control over the background color, and without this event box, + nothing inside the transport_frame actually draws a background. We + would therefore end up seeing the background of the parent widget, + which is probably some default color. Adding the EventBox adds a + widget that will draw the background, using a style based on + the parent, "TransportFrame". + */ + Gtk::EventBox* ebox = manage (new Gtk::EventBox); + transport_frame.add (*ebox); + ebox->add (transport_table); + transport_table.signal_expose_event().connect (sigc::mem_fun (*this, &ARDOUR_UI::transport_expose), false); /* transport controls sub-group */ diff --git a/gtk2_ardour/clearlooks.rc.in b/gtk2_ardour/clearlooks.rc.in index 9047c0a906..aa7b5fd0c2 100644 --- a/gtk2_ardour/clearlooks.rc.in +++ b/gtk2_ardour/clearlooks.rc.in @@ -1095,6 +1095,7 @@ widget "*timecodeoffset clock" style:highest "medium_text" widget "*BaseFrame" style:highest "base_frame" widget "*TransportFrame" style:highest "transport_frame" +widget "*TransportFrame*" style:highest "transport_frame" widget "*SendStripBase" style:highest "send_strip_base" widget "*AudioTrackStripBase" style:highest "audio_track_base"