summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/ardour_ui.cc6
-rw-r--r--gtk2_ardour/ardour_ui.h2
-rw-r--r--gtk2_ardour/ardour_ui_ed.cc11
3 files changed, 15 insertions, 4 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index f113c1ce1b..811ebc2fdd 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -339,6 +339,8 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
_process_thread = new ProcessThread ();
_process_thread->init ();
+
+ DPIReset.connect (sigc::mem_fun (*this, &ARDOUR_UI::resize_text_widgets));
}
/** @return true if a session was chosen and `apply' clicked, otherwise false if `cancel' was clicked */
@@ -1065,7 +1067,7 @@ 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
+ /* If this text is changed, the set_size_request_to_display_given_text call in ARDOUR_UI::resize_text_widgets
should also be changed.
*/
@@ -1082,7 +1084,7 @@ 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
+ /* If this text is changed, the set_size_request_to_display_given_text call in ARDOUR_UI::resize_text_widgets
should also be changed.
*/
diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h
index f42f936f32..3eeab1c85f 100644
--- a/gtk2_ardour/ardour_ui.h
+++ b/gtk2_ardour/ardour_ui.h
@@ -739,6 +739,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
void successful_graph_sort ();
bool _feedback_exists;
+
+ void resize_text_widgets ();
};
#endif /* __ardour_gui_h__ */
diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc
index 4f954c8edc..8063f495b3 100644
--- a/gtk2_ardour/ardour_ui_ed.cc
+++ b/gtk2_ardour/ardour_ui_ed.cc
@@ -548,13 +548,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);
+
+ resize_text_widgets ();
sample_rate_box.add (sample_rate_label);
sample_rate_box.set_name ("SampleRate");
@@ -828,3 +828,10 @@ ARDOUR_UI::toggle_global_port_matrix (ARDOUR::DataType t)
}
}
}
+
+void
+ARDOUR_UI::resize_text_widgets ()
+{
+ set_size_request_to_display_given_text (cpu_load_label, "DSP: 100.0%", 2, 2);
+ set_size_request_to_display_given_text (buffer_load_label, "Buffers: p:100% c:100%", 2, 2);
+}