mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
TMM: Fix BPM display format #8118
This commit is contained in:
parent
087d52a77c
commit
f2cf60900b
1 changed files with 6 additions and 6 deletions
|
|
@ -340,6 +340,8 @@ TransportMastersWidget::Row::Row (TransportMastersWidget& p)
|
|||
last_box.modify_bg (Gtk::STATE_NORMAL, bg_color);
|
||||
last.modify_fg (Gtk::STATE_NORMAL, fg_color);
|
||||
|
||||
set_size_request_to_display_given_text (format, "999.9 BPM", 0, 0);
|
||||
|
||||
}
|
||||
|
||||
TransportMastersWidget::Row::~Row ()
|
||||
|
|
@ -607,8 +609,6 @@ TransportMastersWidget::Row::update (Session* s, samplepos_t now)
|
|||
return;
|
||||
}
|
||||
|
||||
static const char *disp_fmt = "<span font_family=\"monospace\" foreground=\"gray\" background=\"black\" size=\"larger\" > %1 </span>";
|
||||
|
||||
string current_str (" --:--:--:--");
|
||||
string delta_str ("\u0394 ---- ");
|
||||
string age_str (" ");
|
||||
|
|
@ -625,9 +625,10 @@ TransportMastersWidget::Row::update (Session* s, samplepos_t now)
|
|||
AudioEngine::instance()->sample_rate(), 0, false, 0);
|
||||
|
||||
} else if ((mtm = boost::dynamic_pointer_cast<MIDIClock_TransportMaster> (tm))) {
|
||||
char buf[8];
|
||||
snprintf (buf, sizeof (buf), "%.1fBPM", mtm->bpm());
|
||||
format.set_text (string_compose (disp_fmt, buf));
|
||||
char buf[16];
|
||||
snprintf (buf, sizeof (buf), "%.1f BPM", mtm->bpm());
|
||||
buf[15] = '\0';
|
||||
format.set_text (buf);
|
||||
s->sample_to_timecode (pos, t, false, false);
|
||||
} else {
|
||||
format.set_text (" - ");
|
||||
|
|
@ -707,7 +708,6 @@ TransportMastersWindow::on_realize ()
|
|||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
TransportMastersWindow::set_session (ARDOUR::Session* s)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue