Update menu bar widget size requests on font scaling.
git-svn-id: svn://localhost/ardour2/branches/3.0@8866 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
039a7f544a
commit
813df53d2f
@ -715,6 +715,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||||||
|
|
||||||
int missing_file (ARDOUR::Session*s, std::string str, ARDOUR::DataType type);
|
int missing_file (ARDOUR::Session*s, std::string str, ARDOUR::DataType type);
|
||||||
int ambiguous_file (std::string file, std::string path, std::vector<std::string> hits);
|
int ambiguous_file (std::string file, std::string path, std::vector<std::string> hits);
|
||||||
|
|
||||||
|
void resize_text_widgets ();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __ardour_gui_h__ */
|
#endif /* __ardour_gui_h__ */
|
||||||
|
@ -513,29 +513,25 @@ ARDOUR_UI::build_menu_bar ()
|
|||||||
// so use this instead ...
|
// so use this instead ...
|
||||||
gtk_settings_set_long_property (gtk_settings_get_default(), "gtk-can-change-accels", 1, "Ardour:designers");
|
gtk_settings_set_long_property (gtk_settings_get_default(), "gtk-can-change-accels", 1, "Ardour:designers");
|
||||||
|
|
||||||
/* Set up some size requests here to stop the menu-bar clock jumping around in full-screen mode */
|
resize_text_widgets ();
|
||||||
|
DPIReset.connect (sigc::mem_fun (*this, &ARDOUR_UI::resize_text_widgets));
|
||||||
|
|
||||||
set_size_request_to_display_given_text (wall_clock_label, _("99:99"), 2, 0);
|
|
||||||
wall_clock_box.add (wall_clock_label);
|
wall_clock_box.add (wall_clock_label);
|
||||||
wall_clock_box.set_name ("WallClock");
|
wall_clock_box.set_name ("WallClock");
|
||||||
wall_clock_label.set_name ("WallClock");
|
wall_clock_label.set_name ("WallClock");
|
||||||
|
|
||||||
set_size_request_to_display_given_text (disk_space_label, _("9999h:999999m:99999999s"), 2, 0);
|
|
||||||
disk_space_box.add (disk_space_label);
|
disk_space_box.add (disk_space_label);
|
||||||
disk_space_box.set_name ("WallClock");
|
disk_space_box.set_name ("WallClock");
|
||||||
disk_space_label.set_name ("WallClock");
|
disk_space_label.set_name ("WallClock");
|
||||||
|
|
||||||
set_size_request_to_display_given_text (cpu_load_label, _("DSP: 100.0%"), 2, 0);
|
|
||||||
cpu_load_box.add (cpu_load_label);
|
cpu_load_box.add (cpu_load_label);
|
||||||
cpu_load_box.set_name ("CPULoad");
|
cpu_load_box.set_name ("CPULoad");
|
||||||
cpu_load_label.set_name ("CPULoad");
|
cpu_load_label.set_name ("CPULoad");
|
||||||
|
|
||||||
set_size_request_to_display_given_text (buffer_load_label, _("Buffers p:100% c:100%"), 2, 0);
|
|
||||||
buffer_load_box.add (buffer_load_label);
|
buffer_load_box.add (buffer_load_label);
|
||||||
buffer_load_box.set_name ("BufferLoad");
|
buffer_load_box.set_name ("BufferLoad");
|
||||||
buffer_load_label.set_name ("BufferLoad");
|
buffer_load_label.set_name ("BufferLoad");
|
||||||
|
|
||||||
set_size_request_to_display_given_text (sample_rate_label, X_("384 kHz / 1000 ms"), 2, 0);
|
|
||||||
sample_rate_box.add (sample_rate_label);
|
sample_rate_box.add (sample_rate_label);
|
||||||
sample_rate_box.set_name ("SampleRate");
|
sample_rate_box.set_name ("SampleRate");
|
||||||
sample_rate_label.set_name ("SampleRate");
|
sample_rate_label.set_name ("SampleRate");
|
||||||
@ -562,6 +558,18 @@ ARDOUR_UI::build_menu_bar ()
|
|||||||
menu_bar_base.add (menu_hbox);
|
menu_bar_base.add (menu_hbox);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ARDOUR_UI::resize_text_widgets ()
|
||||||
|
{
|
||||||
|
/* Set up some size requests here to stop the menu-bar clock jumping around in full-screen mode */
|
||||||
|
|
||||||
|
set_size_request_to_display_given_text (wall_clock_label, _("99:99"), 2, 0);
|
||||||
|
set_size_request_to_display_given_text (disk_space_label, _("9999h:999999m:99999999s"), 2, 0);
|
||||||
|
set_size_request_to_display_given_text (cpu_load_label, _("DSP: 100.0%"), 2, 0);
|
||||||
|
set_size_request_to_display_given_text (buffer_load_label, _("Buffers p:100% c:100%"), 2, 0);
|
||||||
|
set_size_request_to_display_given_text (sample_rate_label, X_("384 kHz / 1000 ms"), 2, 0);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::use_menubar_as_top_menubar ()
|
ARDOUR_UI::use_menubar_as_top_menubar ()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user