From 7127fa2c9b2cb8e5409052fa3698fabe9b3070ba Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Wed, 14 Feb 2018 15:05:49 -0600 Subject: If the gauges arent clickable, perhaps they look best with hard edges, matching the master-bus meters in the toolbar. --- gtk2_ardour/ardour_gauge.cc | 13 +++++++++---- gtk2_ardour/ardour_ui.h | 1 + gtk2_ardour/ardour_ui2.cc | 5 ++++- gtk2_ardour/ardour_ui_dialogs.cc | 1 + 4 files changed, 15 insertions(+), 5 deletions(-) (limited to 'gtk2_ardour') diff --git a/gtk2_ardour/ardour_gauge.cc b/gtk2_ardour/ardour_gauge.cc index 809ed7856d..1426713fc3 100644 --- a/gtk2_ardour/ardour_gauge.cc +++ b/gtk2_ardour/ardour_gauge.cc @@ -72,23 +72,28 @@ void ArdourGauge::render (Cairo::RefPtr const& ctx, cairo_rectangle_t*) { cairo_t* cr = ctx->cobj (); + Gtkmm2ext::Color bg = UIConfiguration::instance().color ("gtk_background"); Gtkmm2ext::Color base = UIConfiguration::instance ().color ("ruler base"); Gtkmm2ext::Color text = UIConfiguration::instance ().color ("ruler text"); const int width = get_width (); const int height = get_height (); - Gtkmm2ext::rounded_rectangle (cr, 0, 0, width, height, PADDING + 1); - Gtkmm2ext::set_source_rgba (cr, base); + cairo_rectangle (cr, 0, 0, width, height); + cairo_set_source_rgba (cr, 0,0,0,1 ); + cairo_fill (cr); + + cairo_rectangle (cr, 1, 1, width-2, height-2); + Gtkmm2ext::set_source_rgba (cr, bg); cairo_fill (cr); if (alert () && _blink) { - Gtkmm2ext::rounded_rectangle (cr, 1, 1, width - 2, height - 2, PADDING + 1); + Gtkmm2ext::rounded_rectangle (cr, 1, 1, width - 2, height - 2, 1); cairo_set_source_rgba (cr, 0.5, 0, 0, 1.0); cairo_fill (cr); } - Gtkmm2ext::rounded_rectangle (cr, PADDING, PADDING, width - PADDING - PADDING, height - PADDING - PADDING, PADDING + 1); + cairo_rectangle (cr, PADDING, PADDING, width - PADDING - PADDING, height - PADDING - PADDING); cairo_clip (cr); const float lvl = level (); diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index 36dbebea95..bcf17c1459 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -495,6 +495,7 @@ private: ArdourWidgets::ArdourVSpacer status_spacer; ArdourWidgets::ArdourVSpacer meterbox_spacer; + ArdourWidgets::ArdourVSpacer meterbox_spacer2; ArdourWidgets::ArdourButton auto_return_button; ArdourWidgets::ArdourButton follow_edits_button; diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc index 71d4af10b8..7de82f685e 100644 --- a/gtk2_ardour/ardour_ui2.cc +++ b/gtk2_ardour/ardour_ui2.cc @@ -217,13 +217,16 @@ ARDOUR_UI::repack_transport_hbox () } if (meterbox_spacer.get_parent()) { transport_hbox.remove (meterbox_spacer); + transport_hbox.remove (meterbox_spacer2); } if (UIConfiguration::instance().get_show_editor_meter()) { - transport_hbox.pack_end (editor_meter_table, false, false); transport_hbox.pack_end (meterbox_spacer, false, false, 3); + transport_hbox.pack_end (editor_meter_table, false, false); + transport_hbox.pack_end (meterbox_spacer2, false, false, 3); editor_meter_table.show(); meterbox_spacer.show(); + meterbox_spacer2.show(); } } diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc index 8a3b9d1722..eb91e7093f 100644 --- a/gtk2_ardour/ardour_ui_dialogs.cc +++ b/gtk2_ardour/ardour_ui_dialogs.cc @@ -238,6 +238,7 @@ ARDOUR_UI::set_session (Session *s) editor_meter->ButtonPress.connect_same_thread (editor_meter_connection, boost::bind (&ARDOUR_UI::editor_meter_button_press, this, _1)); editor_meter_table.set_homogeneous(true); + editor_meter_table.set_spacings(3); editor_meter_table.attach(*editor_meter, 0,1, 0,2, SHRINK, EXPAND); editor_meter_table.attach(editor_meter_peak_display, 0,1, 2,3, EXPAND|FILL, EXPAND|FILL); -- cgit v1.2.3