diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2017-01-05 22:22:05 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2017-01-05 22:22:14 +0000 |
commit | a5e0f1ff10cb1bdc0f910ff5c6f0e08c667aed4c (patch) | |
tree | 73eaad6f75348c592c23c9119fabd2ed5e9a80a0 /gtk2_ardour/ardour_ui2.cc | |
parent | ca9caa0394595d96bf41bc42835d1cc79b8a9f19 (diff) |
make entire transport bar have its own background, specifically themeable
Diffstat (limited to 'gtk2_ardour/ardour_ui2.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui2.cc | 14 |
1 files changed, 13 insertions, 1 deletions
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 */ |