diff options
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 8 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui_ed.cc | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 0eafd957d0..33b079da1e 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -1044,6 +1044,10 @@ ARDOUR_UI::update_cpu_load () { char buf[64]; + /* If this text is changed, the set_size_request_to_display_given_text call in ARDOUR_UI::build_menu_bar + should also be changed. + */ + float const c = engine->get_cpu_load (); snprintf (buf, sizeof (buf), _("DSP: <span foreground=\"%s\">%5.1f%%</span>"), c >= 90 ? X_("red") : X_("green"), c); cpu_load_label.set_markup (buf); @@ -1057,6 +1061,10 @@ ARDOUR_UI::update_buffer_load () uint32_t const playback = _session ? _session->playback_load () : 100; uint32_t const capture = _session ? _session->capture_load () : 100; + /* If this text is changed, the set_size_request_to_display_given_text call in ARDOUR_UI::build_menu_bar + should also be changed. + */ + if (_session) { snprintf ( buf, sizeof (buf), diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index 7bfa420a36..1771c944a1 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -535,11 +535,13 @@ ARDOUR_UI::build_menu_bar () cpu_load_box.set_name ("CPULoad"); cpu_load_label.set_name ("CPULoad"); cpu_load_label.set_use_markup (); + set_size_request_to_display_given_text (cpu_load_label, "DSP: 100.0%", 2, 2); buffer_load_box.add (buffer_load_label); buffer_load_box.set_name ("BufferLoad"); buffer_load_label.set_name ("BufferLoad"); buffer_load_label.set_use_markup (); + set_size_request_to_display_given_text (buffer_load_label, "Buffers: p:100% c:100%", 2, 2); sample_rate_box.add (sample_rate_label); sample_rate_box.set_name ("SampleRate"); |