From 42df310c6f83be7d175840346aa3e6f214a16bfa Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 10 Oct 2019 23:58:49 +0200 Subject: Add "List/Browse" vector icon --- libs/widgets/ardour_icon.cc | 29 +++++++++++++++++++++++++++++ libs/widgets/widgets/ardour_icon.h | 1 + 2 files changed, 30 insertions(+) (limited to 'libs/widgets') diff --git a/libs/widgets/ardour_icon.cc b/libs/widgets/ardour_icon.cc index 2f96b97470..10165c4b27 100644 --- a/libs/widgets/ardour_icon.cc +++ b/libs/widgets/ardour_icon.cc @@ -1119,6 +1119,32 @@ static void icon_save_arrow_box (cairo_t *cr, const int width, const int height, VECTORICONSTROKE (lw, fg_color); } +static void icon_list_browse (cairo_t *cr, const int width, const int height, const uint32_t fg_color) +{ + const double x = width * .5; + const double y = height * .5; + const double d = std::min (x, y) * .5; + const double r = std::min (x, y) * .1; + const double l = std::min (x, y) * .2; + const double lw = DEFAULT_LINE_WIDTH; + + Gtkmm2ext::set_source_rgba (cr, fg_color); + cairo_arc (cr, x-d, y-d, r, 0, 2. * M_PI); + cairo_fill (cr); + cairo_arc (cr, x-d, y, r, 0, 2. * M_PI); + cairo_fill (cr); + cairo_arc (cr, x-d, y+d, r, 0, 2. * M_PI); + cairo_fill (cr); + + cairo_move_to (cr, x - l, rint (y - d) + .5); + cairo_line_to (cr, x + d, rint (y - d) + .5); + cairo_move_to (cr, x - l, rint (y) + .5); + cairo_line_to (cr, x + d, rint (y) + .5); + cairo_move_to (cr, x - l, rint (y + d) + .5); + cairo_line_to (cr, x + d, rint (y + d) + .5); + VECTORICONSTROKE(lw, fg_color); +} + static void icon_on_off (cairo_t *cr, const int width, const int height, const uint32_t fg_color) { const double x = width * .5; @@ -1398,6 +1424,9 @@ ArdourWidgets::ArdourIcon::render (cairo_t *cr, case PsetDelete: icon_no_parking (cr, width, height, fg_color); break; + case PsetBrowse: + icon_list_browse (cr, width, height, fg_color); + break; case PluginReset: icon_reset_knob (cr, width, height, fg_color); break; diff --git a/libs/widgets/widgets/ardour_icon.h b/libs/widgets/widgets/ardour_icon.h index 0144feade8..60c0ec2b8c 100644 --- a/libs/widgets/widgets/ardour_icon.h +++ b/libs/widgets/widgets/ardour_icon.h @@ -61,6 +61,7 @@ namespace ArdourWidgets { namespace ArdourIcon { PsetAdd, PsetSave, PsetDelete, + PsetBrowse, PluginReset, PluginBypass, PluginPinout, -- cgit v1.2.3