#include "pbd/error.h"
#include "pbd/convert.h"
#include "pbd/stacktrace.h"
+#include "pbd/unwind.h"
#include <gtkmm2ext/doi.h>
#include <gtkmm2ext/utils.h>
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*/)
, _y_position (0)
, _editor (ed)
, name_entry (0)
+ , ending_name_edit (false)
, control_parent (0)
, _order (0)
, _effective_height (0)
}
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);
}
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 ();
}
if (!name_entry) {
return;
}
+
+ if (ending_name_edit) {
+ /* already doing this, and focus out or other event has caused
+ us to re-enter this code.
+ */
+ return;
+ }
+
+ PBD::Unwinder<bool> uw (ending_name_edit, true);
bool edit_next = false;
bool edit_prev = false;
rect = new SelectionRect;
- rect->rect = new ArdourCanvas::TimeRectangle (selection_group);
+ rect->rect = new ArdourCanvas::Rectangle (selection_group);
CANVAS_DEBUG_NAME (rect->rect, "selection rect");
rect->rect->set_outline (false);
rect->rect->set_fill_color (ARDOUR_UI::config()->color_mod ("selection rect", "selection rect"));
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);