diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2020-03-23 18:34:31 -0600 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2020-03-23 18:34:31 -0600 |
commit | e04f0a4c2cd091d39ec2aea08574a62111f4c081 (patch) | |
tree | f1a2851ba81b2a388f33f875bcabb1ad4e0ddb94 /gtk2_ardour/transport_masters_dialog.cc | |
parent | 83584c65537e1281649420ce4f4863f387571c37 (diff) |
tweaks to display in TransportMastersWidget to reduce width jumping
Diffstat (limited to 'gtk2_ardour/transport_masters_dialog.cc')
-rw-r--r-- | gtk2_ardour/transport_masters_dialog.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gtk2_ardour/transport_masters_dialog.cc b/gtk2_ardour/transport_masters_dialog.cc index cd00d56460..4ca8f70a16 100644 --- a/gtk2_ardour/transport_masters_dialog.cc +++ b/gtk2_ardour/transport_masters_dialog.cc @@ -68,7 +68,7 @@ TransportMastersWidget::TransportMastersWidget () col_title[3].set_markup (string_compose ("<span weight=\"bold\">%1</span>", _("Format"))); col_title[4].set_markup (string_compose ("<span weight=\"bold\">%1</span>", _("Current"))); col_title[5].set_markup (string_compose ("<span weight=\"bold\">%1</span>", _("Last"))); - col_title[6].set_markup (string_compose ("<span weight=\"bold\">%1</span>", _("Timestamp"))); + col_title[6].set_markup (string_compose ("<span weight=\"bold\">%1</span>", _("Age"))); col_title[7].set_markup (string_compose ("<span weight=\"bold\">%1</span>", _("Delta"))); col_title[8].set_markup (string_compose ("<span weight=\"bold\">%1</span>", _("Collect"))); col_title[9].set_markup (string_compose ("<span weight=\"bold\">%1</span>", _("Source"))); @@ -88,6 +88,7 @@ TransportMastersWidget::TransportMastersWidget () "That is not the actual rate. However, some vendors use that rate - despite it being against the specs - " "because the variant of using exactly 29.97 fps has zero timecode drift.\n" )); + set_tooltip (col_title[6], _("How long since the last full timestamp was received from this transport master")); set_tooltip (col_title[11], string_compose (_("<b>When enabled</b> the external timecode source is assumed to be sample-clock synced to the audio interface\n" "being used by %1."), PROGRAM_NAME)); @@ -594,11 +595,14 @@ TransportMastersWidget::Row::update (Session* s, samplepos_t now) } char gap[32]; - const float seconds = (when - now) / (float) AudioEngine::instance()->sample_rate(); + float seconds = (when - now) / (float) AudioEngine::instance()->sample_rate(); + if (seconds < 0.) { + seconds = 0.; + } if (abs (seconds) < 1.0) { - snprintf (gap, sizeof (gap), "%.3fs", seconds); + snprintf (gap, sizeof (gap), "%-.03fs", seconds); } else if (abs (seconds) < 4.0) { - snprintf (gap, sizeof (gap), "%ds", (int) floor (seconds)); + snprintf (gap, sizeof (gap), "%-3ds", (int) floor (seconds)); } else { snprintf (gap, sizeof (gap), "%s", _(">4s ago")); } @@ -612,9 +616,9 @@ TransportMastersWidget::Row::update (Session* s, samplepos_t now) const float seconds = (when - now) / (float) AudioEngine::instance()->sample_rate(); if (abs (seconds) < 1.0) { - snprintf (gap, sizeof (gap), "%.3fs", seconds); + snprintf (gap, sizeof (gap), "%-.3fs", seconds); } else if (abs (seconds) < 4.0) { - snprintf (gap, sizeof (gap), "%ds", (int) floor (seconds)); + snprintf (gap, sizeof (gap), "%-2ds", (int) floor (seconds)); } else { snprintf (gap, sizeof (gap), "%s", _(">4s ago")); } |