summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Loftis <ben@harrisonconsoles.com>2018-02-15 17:31:37 -0600
committerBen Loftis <ben@harrisonconsoles.com>2018-02-17 09:13:05 -0600
commit33bee4128841ef5d3fb04a42d7c9623beb126e9c (patch)
tree707a877ff0a788f5fb2f39fb97a961a997cb5b7e
parent5200885fb82cfe4644eceaafefea014129156f93 (diff)
Move cpu and disk gauges into the status bar at top.
-rw-r--r--gtk2_ardour/ardour_gauge.cc9
-rw-r--r--gtk2_ardour/ardour_ui.h1
-rw-r--r--gtk2_ardour/ardour_ui2.cc21
-rw-r--r--gtk2_ardour/ardour_ui_ed.cc26
-rw-r--r--gtk2_ardour/rc_option_editor.cc16
-rw-r--r--gtk2_ardour/ui_config_vars.h2
6 files changed, 18 insertions, 57 deletions
diff --git a/gtk2_ardour/ardour_gauge.cc b/gtk2_ardour/ardour_gauge.cc
index 1426713fc3..80249ac3c8 100644
--- a/gtk2_ardour/ardour_gauge.cc
+++ b/gtk2_ardour/ardour_gauge.cc
@@ -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());
diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h
index cceceae8d3..a0f6d5f783 100644
--- a/gtk2_ardour/ardour_ui.h
+++ b/gtk2_ardour/ardour_ui.h
@@ -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;
diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc
index 8234b476f6..60b951f4bf 100644
--- a/gtk2_ardour/ardour_ui2.cc
+++ b/gtk2_ardour/ardour_ui2.cc
@@ -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);
diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc
index 3a50c3f42a..55d01f3c0c 100644
--- a/gtk2_ardour/ardour_ui_ed.cc
+++ b/gtk2_ardour/ardour_ui_ed.cc
@@ -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);
diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc
index 0122e925f9..cc9cef695b 100644
--- a/gtk2_ardour/rc_option_editor.cc
+++ b/gtk2_ardour/rc_option_editor.cc
@@ -3853,22 +3853,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",
_("Display Navigation Timeline"),
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_show_mini_timeline),
diff --git a/gtk2_ardour/ui_config_vars.h b/gtk2_ardour/ui_config_vars.h
index df7db047d8..7a42234966 100644
--- a/gtk2_ardour/ui_config_vars.h
+++ b/gtk2_ardour/ui_config_vars.h
@@ -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)