summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-09-07 18:50:57 +0200
committerRobin Gareus <robin@gareus.org>2014-09-07 20:23:49 +0200
commit1bb6fd752c50b5face6ae46629a05b1678d5e1a9 (patch)
treedc9d8d30e5a216b35da131728e2c3ffb376b25d5
parentcb07f0f99b3b4c10ebf23c8ddeca6a0c93ae8a56 (diff)
special case track-header buttons
-rw-r--r--gtk2_ardour/automation_time_axis.cc5
-rw-r--r--gtk2_ardour/route_time_axis.cc22
-rw-r--r--gtk2_ardour/time_axis_view.cc2
3 files changed, 13 insertions, 16 deletions
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc
index 8d97afc1b4..0b97a9366e 100644
--- a/gtk2_ardour/automation_time_axis.cc
+++ b/gtk2_ardour/automation_time_axis.cc
@@ -129,6 +129,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (
}
hide_button.set_elements ((ArdourButton::Element)(ArdourButton::Edge|ArdourButton::Body|ArdourButton::CloseCross));
+ hide_button.set_tweaks(ArdourButton::TrackHeader);
auto_button.set_name ("route button");
hide_button.set_name ("route button");
@@ -198,7 +199,9 @@ AutomationTimeAxisView::AutomationTimeAxisView (
blankB->set_name ("AudioBusControlsBaseUnselected");
}
blank0->set_size_request (-1, -1);
- blankB->set_size_request (4, -1);
+ // one button width (blank0) + 2 * table colspacing - 1 * sep line
+ // -> align with 2nd button in Mixbus profile
+ blankB->set_size_request (3, -1);
VSeparator* separator = manage (new VSeparator());
separator->set_name("TrackSeparator");
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc
index a8ea6bd4e5..74c59977e0 100644
--- a/gtk2_ardour/route_time_axis.cc
+++ b/gtk2_ardour/route_time_axis.cc
@@ -172,7 +172,6 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
} else {
controls_table.attach (*rec_enable_button, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
}
- controls_button_size_group->add_widget(*rec_enable_button);
if (is_midi_track()) {
ARDOUR_UI::instance()->set_tip(*rec_enable_button, _("Record (Right-click for Step Edit)"));
@@ -216,6 +215,8 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
} else {
controls_table.attach (*mute_button, 3, 4, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
}
+ // mute button is always present, it is used to
+ // force the 'blank' placeholders to the proper size
controls_button_size_group->add_widget(*mute_button);
if (!_route->is_master()) {
@@ -224,7 +225,6 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
} else {
controls_table.attach (*solo_button, 4, 5, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
}
- controls_button_size_group->add_widget(*solo_button);
} else {
Gtk::Fixed *blank = manage(new Gtk::Fixed());
controls_button_size_group->add_widget(*blank);
@@ -237,12 +237,10 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
}
if (ARDOUR::Profile->get_mixbus()) {
- controls_button_size_group->add_widget(route_group_button);
controls_table.attach (route_group_button, 2, 3, 2, 3, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
controls_table.attach (gm.get_gain_slider(), 3, 5, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 1, 0);
}
else if (!ARDOUR::Profile->get_trx()) {
- controls_button_size_group->add_widget(route_group_button);
controls_table.attach (route_group_button, 4, 5, 2, 3, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
controls_table.attach (gm.get_gain_slider(), 0, 2, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 1, 0);
}
@@ -251,12 +249,12 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
ARDOUR_UI::instance()->set_tip(*mute_button,_("Mute"));
ARDOUR_UI::instance()->set_tip(route_group_button, _("Route Group"));
- mute_button->set_tweaks(ArdourButton::Square);
- solo_button->set_tweaks(ArdourButton::Square);
- rec_enable_button->set_tweaks(ArdourButton::Square);
- playlist_button.set_tweaks(ArdourButton::Square);
- automation_button.set_tweaks(ArdourButton::Square);
- route_group_button.set_tweaks(ArdourButton::Square);
+ mute_button->set_tweaks(ArdourButton::TrackHeader);
+ solo_button->set_tweaks(ArdourButton::TrackHeader);
+ rec_enable_button->set_tweaks(ArdourButton::TrackHeader);
+ playlist_button.set_tweaks(ArdourButton::TrackHeader);
+ automation_button.set_tweaks(ArdourButton::TrackHeader);
+ route_group_button.set_tweaks(ArdourButton::TrackHeader);
if (is_midi_track()) {
ARDOUR_UI::instance()->set_tip(automation_button, _("MIDI Controllers and Automation"));
@@ -269,21 +267,17 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
if (ARDOUR::Profile->get_mixbus()) {
controls_table.attach (automation_button, 1, 2, 2, 3, Gtk::SHRINK, Gtk::SHRINK);
- controls_button_size_group->add_widget(automation_button);
}
else if (!ARDOUR::Profile->get_trx()) {
controls_table.attach (automation_button, 3, 4, 2, 3, Gtk::SHRINK, Gtk::SHRINK);
- controls_button_size_group->add_widget(automation_button);
}
if (is_track() && track()->mode() == ARDOUR::Normal) {
if (ARDOUR::Profile->get_mixbus()) {
controls_table.attach (playlist_button, 0, 1, 2, 3, Gtk::SHRINK, Gtk::SHRINK);
- controls_button_size_group->add_widget(playlist_button);
}
else if (!ARDOUR::Profile->get_trx()) {
controls_table.attach (playlist_button, 2, 3, 2, 3, Gtk::SHRINK, Gtk::SHRINK);
- controls_button_size_group->add_widget(playlist_button);
}
}
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc
index cb795b6374..2923f63076 100644
--- a/gtk2_ardour/time_axis_view.cc
+++ b/gtk2_ardour/time_axis_view.cc
@@ -1147,7 +1147,7 @@ TimeAxisView::compute_heights ()
window.add (one_row_table);
test_button->set_name ("mute button");
test_button->set_text (_("M"));
- test_button->set_tweaks (ArdourButton::Square);
+ test_button->set_tweaks (ArdourButton::TrackHeader);
one_row_table.set_border_width (border_width);
one_row_table.set_row_spacings (2);