diff --git a/libs/widgets/ardour_icon.cc b/libs/widgets/ardour_icon.cc index fab8a0cbf1..83ba8ba3e5 100644 --- a/libs/widgets/ardour_icon.cc +++ b/libs/widgets/ardour_icon.cc @@ -922,6 +922,23 @@ static void icon_plus_sign (cairo_t *cr, const int width, const int height, cons Gtkmm2ext::set_source_rgba (cr, fg_color); cairo_fill (cr); } + +static void icon_shaded_plus_sign (cairo_t *cr, const int width, const int height, const uint32_t fg_color) +{ + const double lw = std::min (12., ceil (std::min (width, height) * .035)); + const double ln = std::min (68., rint (std::min (width, height) * .2)); + const double lc = fmod (lw * .5, 1.0); + const double xc = rint (width * .5) - lc; + const double yc = rint (height * .5) - lc; + + cairo_rectangle (cr, xc - lw * .5, yc - ln, lw, ln * 2); + cairo_rectangle (cr, xc - ln, yc - lw * .5, ln * 2, lw); + + int alpha = lw == 1 ? 0x80 : 0x20; + Gtkmm2ext::set_source_rgba (cr, (fg_color & 0xffffff00) | alpha); + cairo_fill (cr); +} + /** mixer strip narrow/wide */ static void icon_strip_width (cairo_t *cr, const int width, const int height, const uint32_t fg_color) { @@ -1300,6 +1317,9 @@ ArdourWidgets::ArdourIcon::render (cairo_t *cr, case PlusSign: icon_plus_sign (cr, width, height, fg_color); break; + case ShadedPlusSign: + icon_shaded_plus_sign (cr, width, height, fg_color); + break; case StripWidth: icon_strip_width (cr, width, height, fg_color); break; diff --git a/libs/widgets/widgets/ardour_icon.h b/libs/widgets/widgets/ardour_icon.h index 65bfcaef76..82f9af80b3 100644 --- a/libs/widgets/widgets/ardour_icon.h +++ b/libs/widgets/widgets/ardour_icon.h @@ -70,6 +70,7 @@ namespace ArdourWidgets { namespace ArdourIcon { Config, ConfigReset, PowerOnOff, + ShadedPlusSign, NoIcon //< Last };