remove un-used name_hbox widget from TimeAxisView

This commit is contained in:
Paul Davis 2016-06-01 21:57:32 -04:00
parent 43b6a7aca3
commit 0d999ea4ec
6 changed files with 15 additions and 20 deletions

View file

@ -173,7 +173,9 @@ AutomationTimeAxisView::AutomationTimeAxisView (
//name label isn't editable on an automation track; remove the tooltip
set_tooltip (name_label, X_(""));
/* repack the name label */
/* repack the name label, which TimeAxisView has already attached to
* the controls_table
*/
if (name_label.get_parent()) {
name_label.get_parent()->remove (name_label);
@ -186,7 +188,6 @@ AutomationTimeAxisView::AutomationTimeAxisView (
/* add the buttons */
controls_table.set_border_width (1);
controls_table.remove (name_hbox);
controls_table.attach (hide_button, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
controls_table.attach (name_label, 2, 3, 1, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 2, 0);
controls_table.attach (auto_button, 3, 4, 2, 3, Gtk::SHRINK, Gtk::SHRINK, 0, 0);

View file

@ -2615,7 +2615,6 @@ MixerStrip::update_track_number_visibility ()
if (tnw & 1) --tnw;
number_label.set_size_request(tnw, -1);
number_label.show ();
//name_hbox.set_size_request(TimeAxisView::name_width_px - 2 - tnw, -1); // -2 = cellspacing
} else {
number_label.hide ();
}

View file

@ -430,10 +430,8 @@ RouteTimeAxisView::update_track_number_visibility ()
if (tnw & 1) --tnw;
number_label.set_size_request(tnw, -1);
number_label.show ();
name_hbox.set_size_request(TimeAxisView::name_width_px - 2 - tnw, -1); // -2 = cellspacing
} else {
number_label.hide ();
name_hbox.set_size_request(TimeAxisView::name_width_px, -1);
}
}

View file

@ -148,20 +148,19 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
name_label.set_width_chars (12);
set_tooltip (name_label, _("Track/Bus name (double click to edit)"));
Gtk::Entry* an_entry = new Gtkmm2ext::FocusEntry;
an_entry->set_name ("EditorTrackNameDisplay");
Gtk::Requisition req;
an_entry->size_request (req);
name_label.set_size_request (-1, req.height);
name_label.set_ellipsize (Pango::ELLIPSIZE_MIDDLE);
delete an_entry;
{
std::auto_ptr<Gtk::Entry> an_entry (new Gtkmm2ext::FocusEntry);
an_entry->set_name (X_("TrackNameEditor"));
Gtk::Requisition req;
an_entry->size_request (req);
name_hbox.pack_end (name_label, true, true);
name_label.set_size_request (-1, req.height);
name_label.set_ellipsize (Pango::ELLIPSIZE_MIDDLE);
}
// set min. track-header width if fader is not visible
name_hbox.set_size_request(name_width_px, -1);
name_label.set_size_request(name_width_px, -1);
name_hbox.show ();
name_label.show ();
controls_table.set_row_spacings (2);
@ -169,10 +168,11 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
controls_table.set_border_width (2);
if (ARDOUR::Profile->get_mixbus() ) {
controls_table.attach (name_hbox, 4, 5, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK, 0, 0);
controls_table.attach (name_label, 4, 5, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK, 0, 0);
} else {
controls_table.attach (name_hbox, 1, 2, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK, 0, 0);
controls_table.attach (name_label, 1, 2, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK, 0, 0);
}
controls_table.show_all ();
controls_table.set_no_show_all ();

View file

@ -230,7 +230,6 @@ class TimeAxisView : public virtual AxisView
Gtk::VBox time_axis_vbox;
Gtk::HBox time_axis_hbox;
Gtk::Frame time_axis_frame;
Gtk::HBox name_hbox;
Gtk::HBox top_hbox;
Gtk::Label name_label;
Gtk::Fixed scroomer_placeholder;

View file

@ -256,10 +256,8 @@ VCATimeAxisView::update_track_number_visibility ()
if (tnw & 1) --tnw;
number_label.set_size_request(tnw, -1);
number_label.show ();
name_hbox.set_size_request (TimeAxisView::name_width_px - 2 - tnw, -1); // -2 = cellspacing
} else {
number_label.hide ();
name_hbox.set_size_request (TimeAxisView::name_width_px, -1);
}
}