13
0

change packing so number_label shares space with name_label

This commit is contained in:
Ben Loftis 2014-08-11 15:08:57 -05:00
parent b41df8e120
commit 5c1a561325
2 changed files with 9 additions and 8 deletions

View File

@ -108,7 +108,7 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session* sess, ArdourCan
, gm (sess, true, 75, 20) , gm (sess, true, 75, 20)
, _ignore_set_layer_display (false) , _ignore_set_layer_display (false)
{ {
number_label.set_name("tracknumber label"); number_label.set_name("route button");
number_label.set_alignment(.5, .5); number_label.set_alignment(.5, .5);
sess->config.ParameterChanged.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::parameter_changed, this, _1), gui_context()); sess->config.ParameterChanged.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::parameter_changed, this, _1), gui_context());
@ -366,15 +366,16 @@ RouteTimeAxisView::update_track_number_visibility ()
} }
if (number_label.get_parent()) { if (number_label.get_parent()) {
controls_table.remove (number_label); name_hbox.remove (number_label);
} }
if (show_label) { if (show_label) {
controls_table.resize ( 2, 4 ); // controls_table.resize ( 2, 4 );
controls_table.attach (number_label, 3, 4, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); name_hbox.pack_start(number_label, false, false, 2);
// controls_table.attach (number_label, 3, 4, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
number_label.set_size_request(3 + _session->track_number_decimals() * 8, -1); number_label.set_size_request(3 + _session->track_number_decimals() * 8, -1);
number_label.show (); number_label.show ();
} else { } else {
controls_table.resize ( 2, 3 ); // controls_table.resize ( 2, 3 );
number_label.hide (); number_label.hide ();
} }
} }

View File

@ -125,7 +125,7 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
name_label.set_ellipsize (Pango::ELLIPSIZE_MIDDLE); name_label.set_ellipsize (Pango::ELLIPSIZE_MIDDLE);
delete an_entry; delete an_entry;
name_hbox.pack_start (name_label, true, true); name_hbox.pack_end (name_label, true, true);
name_hbox.show (); name_hbox.show ();
name_label.show (); name_label.show ();
@ -617,7 +617,7 @@ TimeAxisView::begin_name_edit ()
name_hbox.remove (name_label); name_hbox.remove (name_label);
} }
name_hbox.pack_start (*name_entry, false, false); name_hbox.pack_end (*name_entry, false, false);
name_entry->show (); name_entry->show ();
name_entry->select_region (0, -1); name_entry->select_region (0, -1);
@ -662,7 +662,7 @@ TimeAxisView::end_name_edit (int response)
/* put the name label back */ /* put the name label back */
name_hbox.pack_start (name_label); name_hbox.pack_end (name_label);
name_label.show (); name_label.show ();
if (edit_next) { if (edit_next) {