Move cpu and disk gauges into the status bar at top.
authorBen Loftis <ben@harrisonconsoles.com>
Thu, 15 Feb 2018 23:31:37 +0000 (17:31 -0600)
committerBen Loftis <ben@harrisonconsoles.com>
Sat, 17 Feb 2018 15:13:05 +0000 (09:13 -0600)
gtk2_ardour/ardour_gauge.cc
gtk2_ardour/ardour_ui.h
gtk2_ardour/ardour_ui2.cc
gtk2_ardour/ardour_ui_ed.cc
gtk2_ardour/rc_option_editor.cc
gtk2_ardour/ui_config_vars.h

index 1426713fc39e4dd552f1030fb6ed5f23dacbc6fe..80249ac3c8f656a06c18e20fddc7a3c37b21cf9c 100644 (file)
@@ -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());
index cceceae8d3b4b4a1270edd267bbc0fd704261b74..a0f6d5f783d82b2ae1d91d63224be6b2b6c309dd 100644 (file)
@@ -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;
 
index 8234b476f673b480c2a370b814465b7fba58a571..60b951f4bf35df161ff466d6d9b3628e0bf9ace6 100644 (file)
@@ -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);
index 3a50c3f42a8f645bcebf777f49f47608a2efa78f..55d01f3c0c1b757131af705020ac6ffad63abf65 100644 (file)
@@ -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);
index 0122e925f9f6cecf7e4f636dadef2f2cc475e4e6..cc9cef695b80b7212ce623a503fb13a718ac597e 100644 (file)
@@ -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",
index df7db047d88509c69132a1c153ac6b0af918e3d5..7a42234966d71cff1e3a63f499ea51557b9a095d 100644 (file)
@@ -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)