copy contents of analysis, plugins, automation and externals folders during save-as
[ardour.git] / gtk2_ardour / time_axis_view.cc
index a117bb64c1060424be547f2426edfb33fcf4dbb2..e3695fb411c5ae51c264a58cefa5d2d453995c27 100644 (file)
@@ -82,7 +82,7 @@ Glib::RefPtr<Gtk::SizeGroup> TimeAxisView::midi_scroomer_size_group = Glib::RefP
 void
 TimeAxisView::setup_sizes()
 {
-       name_width_px = ceil (100. * ARDOUR_UI::config()->get_font_scale() / 102400.);
+       name_width_px = ceilf (100.f * ARDOUR_UI::ui_scale);
 }
 
 TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisView* rent, Canvas& /*canvas*/)
@@ -568,8 +568,16 @@ TimeAxisView::set_height_enum (Height h, bool apply_to_selection)
 }
 
 void
-TimeAxisView::set_height (uint32_t h)
+TimeAxisView::set_height (uint32_t h, TrackHeightMode m)
 {
+       uint32_t lanes = 0;
+       if (m == TotalHeight) {
+               for (Children::iterator i = children.begin(); i != children.end(); ++i) {
+                       if ( !(*i)->hidden()) ++lanes;
+               }
+       }
+       h /= (lanes + 1);
+
        if (h < preset_height (HeightSmall)) {
                h = preset_height (HeightSmall);
        }
@@ -590,6 +598,12 @@ TimeAxisView::set_height (uint32_t h)
                show_selection (_editor.get_selection().time);
        }
 
+       if (m != OnlySelf) {
+               for (Children::iterator i = children.begin(); i != children.end(); ++i) {
+                       (*i)->set_height(h, OnlySelf);
+               }
+       }
+
        _editor.override_visible_track_count ();
 }
 
@@ -1173,7 +1187,7 @@ TimeAxisView::compute_heights ()
 
        window.add (one_row_table);
        test_button->set_name ("mute button");
-       test_button->set_text (_("M"));
+       test_button->set_text (S_("Mute|M"));
        test_button->set_tweaks (ArdourButton::TrackHeader);
 
        one_row_table.set_border_width (border_width);