mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
Move cpu and disk gauges into the status bar at top.
This commit is contained in:
parent
5200885fb8
commit
33bee41288
6 changed files with 18 additions and 57 deletions
|
|
@ -43,8 +43,8 @@ ArdourGauge::on_size_request (Gtk::Requisition* req)
|
|||
int w, h;
|
||||
_layout->get_pixel_size (w, h);
|
||||
|
||||
req->width = std::max (req->width, std::max (12, h + PADDING));
|
||||
req->height = std::max (req->height, 20 /*std::max (20, w + PADDING) */);
|
||||
req->width = std::max (req->width, 50 /*std::max (20, w + PADDING) */);
|
||||
req->height = std::max (req->height, std::max (12, h + PADDING));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -98,8 +98,8 @@ ArdourGauge::render (Cairo::RefPtr<Cairo::Context> const& ctx, cairo_rectangle_t
|
|||
|
||||
const float lvl = level ();
|
||||
|
||||
int bh = (height - PADDING - PADDING) * lvl;
|
||||
cairo_rectangle (cr, PADDING, height - PADDING - bh, width - PADDING, bh);
|
||||
int bw = (width - PADDING - PADDING) * lvl;
|
||||
cairo_rectangle (cr, width-PADDING-bw, PADDING, bw, height-PADDING);
|
||||
|
||||
switch (indicator ()) {
|
||||
case Level_OK:
|
||||
|
|
@ -120,7 +120,6 @@ ArdourGauge::render (Cairo::RefPtr<Cairo::Context> const& ctx, cairo_rectangle_t
|
|||
cairo_save (cr);
|
||||
cairo_new_path (cr);
|
||||
cairo_translate (cr, width * .5, height * .5);
|
||||
cairo_rotate (cr, M_PI * -.5);
|
||||
|
||||
cairo_move_to (cr, w * -.5, h * -.5);
|
||||
pango_cairo_update_layout (cr, _layout->gobj());
|
||||
|
|
|
|||
|
|
@ -493,7 +493,6 @@ private:
|
|||
DspLoadIndicator dsp_load_indicator;
|
||||
DiskSpaceIndicator disk_space_indicator;
|
||||
|
||||
ArdourWidgets::ArdourVSpacer status_spacer;
|
||||
ArdourWidgets::ArdourVSpacer meterbox_spacer;
|
||||
ArdourWidgets::ArdourVSpacer meterbox_spacer2;
|
||||
|
||||
|
|
|
|||
|
|
@ -139,27 +139,6 @@ bool drag_failed (const Glib::RefPtr<Gdk::DragContext>& context, DragResult resu
|
|||
void
|
||||
ARDOUR_UI::repack_transport_hbox ()
|
||||
{
|
||||
if (dsp_load_indicator.get_parent()) {
|
||||
transport_hbox.remove (dsp_load_indicator);
|
||||
}
|
||||
if (UIConfiguration::instance().get_show_dsp_load_info ()) {
|
||||
transport_hbox.pack_start (dsp_load_indicator, false, false);
|
||||
dsp_load_indicator.show();
|
||||
}
|
||||
|
||||
if (disk_space_indicator.get_parent()) {
|
||||
transport_hbox.remove (disk_space_indicator);
|
||||
}
|
||||
if (UIConfiguration::instance().get_show_disk_space_info ()) {
|
||||
transport_hbox.pack_start (disk_space_indicator, false, false);
|
||||
disk_space_indicator.show();
|
||||
}
|
||||
|
||||
if (status_spacer.get_parent()) {
|
||||
transport_hbox.remove (status_spacer);
|
||||
}
|
||||
transport_hbox.pack_start (status_spacer, false, false, 3);
|
||||
|
||||
if (time_info_box) {
|
||||
if (time_info_box->get_parent()) {
|
||||
transport_hbox.remove (*time_info_box);
|
||||
|
|
|
|||
|
|
@ -666,20 +666,16 @@ void
|
|||
ARDOUR_UI::build_menu_bar ()
|
||||
{
|
||||
menu_bar = dynamic_cast<MenuBar*> (ActionManager::get_widget (X_("/Main")));
|
||||
menu_bar->set_name ("MainMenuBar");
|
||||
menu_bar->set_name ("gtk_background");
|
||||
|
||||
EventBox* ev = manage (new EventBox);
|
||||
ev->show ();
|
||||
CairoHPacker* hbox = manage (new CairoHPacker);
|
||||
hbox->set_name (X_("StatusBarBox"));
|
||||
hbox->set_name (X_("gtk_background"));
|
||||
hbox->show ();
|
||||
hbox->set_border_width (3);
|
||||
hbox->set_border_width (2);
|
||||
|
||||
VBox* vbox = manage (new VBox);
|
||||
vbox->pack_start (*hbox, true, false);
|
||||
vbox->show();
|
||||
|
||||
ev->add (*vbox);
|
||||
ev->add (*hbox);
|
||||
|
||||
wall_clock_label.set_name ("WallClock");
|
||||
wall_clock_label.set_use_markup ();
|
||||
|
|
@ -707,28 +703,34 @@ ARDOUR_UI::build_menu_bar ()
|
|||
#endif
|
||||
|
||||
hbox->pack_end (error_alert_button, false, false, 2);
|
||||
hbox->pack_end (dsp_load_indicator, false, false, 4);
|
||||
|
||||
hbox->pack_end (wall_clock_label, false, false, 2);
|
||||
hbox->pack_end (disk_space_indicator, false, false, 4);
|
||||
#if 0
|
||||
hbox->pack_end (disk_space_label, false, false, 4);
|
||||
#endif
|
||||
hbox->pack_end (xrun_label, false, false, 4);
|
||||
hbox->pack_end (peak_thread_work_label, false, false, 4);
|
||||
#if 0
|
||||
hbox->pack_end (cpu_load_label, false, false, 4);
|
||||
#endif
|
||||
hbox->pack_end (buffer_load_label, false, false, 4);
|
||||
hbox->pack_end (sample_rate_label, false, false, 4);
|
||||
hbox->pack_end (timecode_format_label, false, false, 4);
|
||||
hbox->pack_end (format_label, false, false, 4);
|
||||
hbox->pack_end (peak_thread_work_label, false, false, 4);
|
||||
|
||||
menu_hbox.pack_end (*ev, false, false, 2);
|
||||
|
||||
menu_bar_base.set_name ("MainMenuBar");
|
||||
menu_bar_base.set_name ("gtk_background");
|
||||
menu_bar_base.add (menu_hbox);
|
||||
|
||||
#ifndef __APPLE__
|
||||
// OSX provides its own wallclock, thank you very much
|
||||
_status_bar_visibility.add (&wall_clock_label, X_("WallClock"), _("Wall Clock"), true);
|
||||
#endif
|
||||
_status_bar_visibility.add (&disk_space_label, X_("Disk"), _("Disk Space"), !Profile->get_small_screen());
|
||||
_status_bar_visibility.add (&cpu_load_label, X_("DSP"), _("DSP"), true);
|
||||
_status_bar_visibility.add (&disk_space_indicator, X_("Disk"), _("Disk Space"), !Profile->get_small_screen());
|
||||
_status_bar_visibility.add (&dsp_load_indicator, X_("DSP"), _("DSP"), true);
|
||||
_status_bar_visibility.add (&xrun_label, X_("XRun"), _("X-run"), false);
|
||||
_status_bar_visibility.add (&peak_thread_work_label,X_("Peakfile"), _("Active Peak-file Work"), false);
|
||||
_status_bar_visibility.add (&buffer_load_label, X_("Buffers"), _("Buffers"), true);
|
||||
|
|
|
|||
|
|
@ -3851,22 +3851,6 @@ RCOptionEditor::RCOptionEditor ()
|
|||
));
|
||||
}
|
||||
|
||||
add_option (_("Appearance/Toolbar"),
|
||||
new BoolOption (
|
||||
"show-dsp-load-info",
|
||||
_("Display DSP Load Information"),
|
||||
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_show_dsp_load_info),
|
||||
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_show_dsp_load_info)
|
||||
));
|
||||
|
||||
add_option (_("Appearance/Toolbar"),
|
||||
new BoolOption (
|
||||
"show-disk-space-info",
|
||||
_("Display Disk Space Information"),
|
||||
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_show_disk_space_info),
|
||||
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_show_disk_space_info)
|
||||
));
|
||||
|
||||
add_option (_("Appearance/Toolbar"),
|
||||
new BoolOption (
|
||||
"show-mini-timeline",
|
||||
|
|
|
|||
|
|
@ -82,8 +82,6 @@ UI_CONFIG_VARIABLE (bool, show_toolbar_recpunch, "show-toolbar-recpunch", true)
|
|||
UI_CONFIG_VARIABLE (bool, show_toolbar_monitoring, "show-toolbar-monitoring", false)
|
||||
UI_CONFIG_VARIABLE (bool, show_toolbar_selclock, "show-toolbar-selclock", false)
|
||||
UI_CONFIG_VARIABLE (bool, show_mini_timeline, "show-mini-timeline", true)
|
||||
UI_CONFIG_VARIABLE (bool, show_dsp_load_info, "show-dsp-load-info", true)
|
||||
UI_CONFIG_VARIABLE (bool, show_disk_space_info, "show-disk-space-info", true)
|
||||
UI_CONFIG_VARIABLE (bool, show_secondary_clock, "show-secondary-clock", true)
|
||||
UI_CONFIG_VARIABLE (double, waveform_clip_level, "waveform-clip-level", -0.0933967) /* units of dB */
|
||||
UI_CONFIG_VARIABLE (bool, hiding_groups_deactivates_groups, "hiding-groups-deactivates-groups", true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue