diff --git a/libs/widgets/ardour_button.cc b/libs/widgets/ardour_button.cc index 5c3868a9e2..2c13ecad25 100644 --- a/libs/widgets/ardour_button.cc +++ b/libs/widgets/ardour_button.cc @@ -265,7 +265,10 @@ ArdourButton::render (Cairo::RefPtr const& ctx, cairo_rectangle_ uint32_t text_color; uint32_t led_color; - const float corner_radius = boxy_buttons () ? 0 : std::max(2.f, _corner_radius * UIConfigurationBase::instance().get_ui_scale()); + const bool boxy = (_tweaks & ForceBoxy) | boxy_buttons (); + const bool flat = (_tweaks & ForceFlat) | flat_buttons (); + + const float corner_radius = boxy ? 0 : std::max(2.f, _corner_radius * UIConfigurationBase::instance().get_ui_scale()); if (_update_colors) { set_colors (); @@ -340,7 +343,7 @@ ArdourButton::render (Cairo::RefPtr const& ctx, cairo_rectangle_ } //show the "convex" or "concave" gradient - if (!flat_buttons () && (_elements & Body)==Body) { + if (!flat && (_elements & Body)==Body) { if ( active_state() == Gtkmm2ext::ExplicitActive && ( !((_elements & Indicator)==Indicator) || use_custom_led_color) ) { //concave cairo_set_source (cr, concave_pattern); @@ -524,7 +527,7 @@ ArdourButton::render (Cairo::RefPtr const& ctx, cairo_rectangle_ } //inset - if (!flat_buttons ()) { + if (!flat) { cairo_arc (cr, 0, 0, _diameter * .5, 0, 2 * M_PI); cairo_set_source (cr, led_inset_pattern); cairo_fill (cr); diff --git a/libs/widgets/widgets/ardour_button.h b/libs/widgets/widgets/ardour_button.h index 8a8b03c356..4c63171249 100644 --- a/libs/widgets/widgets/ardour_button.h +++ b/libs/widgets/widgets/ardour_button.h @@ -65,6 +65,8 @@ class LIBWIDGETS_API ArdourButton : public CairoWidget , public Gtkmm2ext::Activ TrackHeader = 0x2, OccasionalText = 0x4, OccasionalLED = 0x8, + ForceBoxy = 0x10, + ForceFlat = 0x20, }; Tweaks tweaks() const { return _tweaks; }