mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
NO-OP: clang-format (and some manual re-indent)
This commit is contained in:
parent
21c22cc850
commit
cb640c7e9c
1 changed files with 396 additions and 362 deletions
|
|
@ -16,9 +16,9 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <math.h> // M_PI
|
|
||||||
#include <assert.h>
|
|
||||||
#include <algorithm> // std:min
|
#include <algorithm> // std:min
|
||||||
|
#include <assert.h>
|
||||||
|
#include <math.h> // M_PI
|
||||||
|
|
||||||
#include "gtkmm2ext/colors.h"
|
#include "gtkmm2ext/colors.h"
|
||||||
#include "gtkmm2ext/rgb_macros.h"
|
#include "gtkmm2ext/rgb_macros.h"
|
||||||
|
|
@ -61,16 +61,15 @@ using namespace ArdourWidgets::ArdourIcon;
|
||||||
cairo_set_line_width (cr, (LW)); \
|
cairo_set_line_width (cr, (LW)); \
|
||||||
cairo_stroke (cr);
|
cairo_stroke (cr);
|
||||||
|
|
||||||
|
|
||||||
/** inverse color */
|
/** inverse color */
|
||||||
static void ardour_icon_set_source_inv_rgba (cairo_t *cr, uint32_t color)
|
static void
|
||||||
|
ardour_icon_set_source_inv_rgba (cairo_t* cr, uint32_t color)
|
||||||
{
|
{
|
||||||
cairo_set_source_rgba (cr,
|
cairo_set_source_rgba (cr,
|
||||||
1.0 - ((color >> 24) & 0xff) / 255.0,
|
1.0 - ((color >> 24) & 0xff) / 255.0,
|
||||||
1.0 - ((color >> 16) & 0xff) / 255.0,
|
1.0 - ((color >> 16) & 0xff) / 255.0,
|
||||||
1.0 - ((color >> 8) & 0xff) / 255.0,
|
1.0 - ((color >> 8) & 0xff) / 255.0,
|
||||||
((color >> 0) & 0xff) / 255.0
|
((color >> 0) & 0xff) / 255.0);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
@ -79,7 +78,9 @@ static void ardour_icon_set_source_inv_rgba (cairo_t *cr, uint32_t color)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** internal edit icon */
|
/** internal edit icon */
|
||||||
static void icon_tool_content (cairo_t *cr, const int width, const int height) {
|
static void
|
||||||
|
icon_tool_content (cairo_t* cr, const int width, const int height)
|
||||||
|
{
|
||||||
#define EM_POINT(X, Y) round (x + (X)*em) + .5, round (y + (Y)*em) + .5
|
#define EM_POINT(X, Y) round (x + (X)*em) + .5, round (y + (Y)*em) + .5
|
||||||
|
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
|
|
@ -129,7 +130,8 @@ static void icon_tool_content (cairo_t *cr, const int width, const int height) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** range tool |<->| */
|
/** range tool |<->| */
|
||||||
static void icon_tool_range (cairo_t *cr, const int width, const int height)
|
static void
|
||||||
|
icon_tool_range (cairo_t* cr, const int width, const int height)
|
||||||
{
|
{
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -164,7 +166,8 @@ static void icon_tool_range (cairo_t *cr, const int width, const int height)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Grab/Object tool - 6x8em "hand", with 'em' wide index finger. */
|
/** Grab/Object tool - 6x8em "hand", with 'em' wide index finger. */
|
||||||
static void icon_tool_grab (cairo_t *cr, const int width, const int height)
|
static void
|
||||||
|
icon_tool_grab (cairo_t* cr, const int width, const int height)
|
||||||
{
|
{
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -219,7 +222,8 @@ static void icon_tool_grab (cairo_t *cr, const int width, const int height)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** cut icon - scissors */
|
/** cut icon - scissors */
|
||||||
static void icon_tool_cut (cairo_t *cr, const int width, const int height)
|
static void
|
||||||
|
icon_tool_cut (cairo_t* cr, const int width, const int height)
|
||||||
{
|
{
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -253,7 +257,8 @@ static void icon_tool_cut (cairo_t *cr, const int width, const int height)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** time stretch icon */
|
/** time stretch icon */
|
||||||
static void icon_tool_stretch (cairo_t *cr, const int width, const int height)
|
static void
|
||||||
|
icon_tool_stretch (cairo_t* cr, const int width, const int height)
|
||||||
{
|
{
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -298,7 +303,8 @@ static void icon_tool_stretch (cairo_t *cr, const int width, const int height)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** audition - small speaker with sound-waves*/
|
/** audition - small speaker with sound-waves*/
|
||||||
static void icon_tool_audition (cairo_t *cr, const int width, const int height)
|
static void
|
||||||
|
icon_tool_audition (cairo_t* cr, const int width, const int height)
|
||||||
{
|
{
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -358,7 +364,8 @@ static void icon_tool_audition (cairo_t *cr, const int width, const int height)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** pen top-left to bottom right */
|
/** pen top-left to bottom right */
|
||||||
static void icon_tool_draw (cairo_t *cr, const int width, const int height)
|
static void
|
||||||
|
icon_tool_draw (cairo_t* cr, const int width, const int height)
|
||||||
{
|
{
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -418,7 +425,8 @@ static void icon_tool_draw (cairo_t *cr, const int width, const int height)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Toolbar icon - Time Axis View reduce height */
|
/** Toolbar icon - Time Axis View reduce height */
|
||||||
static void icon_tav_shrink (cairo_t *cr, const int width, const int height)
|
static void
|
||||||
|
icon_tav_shrink (cairo_t* cr, const int width, const int height)
|
||||||
{
|
{
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -453,7 +461,8 @@ static void icon_tav_shrink (cairo_t *cr, const int width, const int height)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Toolbar icon - Time Axis View increase height */
|
/** Toolbar icon - Time Axis View increase height */
|
||||||
static void icon_tav_expand (cairo_t *cr, const int width, const int height)
|
static void
|
||||||
|
icon_tav_expand (cairo_t* cr, const int width, const int height)
|
||||||
{
|
{
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -494,7 +503,8 @@ static void icon_tav_expand (cairo_t *cr, const int width, const int height)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** standard rec-enable circle */
|
/** standard rec-enable circle */
|
||||||
static void icon_rec_enable (cairo_t *cr, const int width, const int height, const Gtkmm2ext::ActiveState state)
|
static void
|
||||||
|
icon_rec_enable (cairo_t* cr, const int width, const int height, const Gtkmm2ext::ActiveState state)
|
||||||
{
|
{
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -502,11 +512,9 @@ static void icon_rec_enable (cairo_t *cr, const int width, const int height, con
|
||||||
cairo_arc (cr, x, y, r, 0, 2 * M_PI);
|
cairo_arc (cr, x, y, r, 0, 2 * M_PI);
|
||||||
if (state == Gtkmm2ext::ExplicitActive) {
|
if (state == Gtkmm2ext::ExplicitActive) {
|
||||||
cairo_set_source_rgba (cr, 1.0, .1, .1, 1.0);
|
cairo_set_source_rgba (cr, 1.0, .1, .1, 1.0);
|
||||||
}
|
} else if (state == Gtkmm2ext::ImplicitActive) {
|
||||||
else if (state == Gtkmm2ext::ImplicitActive) {
|
|
||||||
cairo_set_source_rgba (cr, .9, .3, .3, 1.0);
|
cairo_set_source_rgba (cr, .9, .3, .3, 1.0);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
cairo_set_source_rgba (cr, .4, .3, .3, 1.0);
|
cairo_set_source_rgba (cr, .4, .3, .3, 1.0);
|
||||||
}
|
}
|
||||||
cairo_fill_preserve (cr);
|
cairo_fill_preserve (cr);
|
||||||
|
|
@ -520,7 +528,8 @@ static void icon_rec_enable (cairo_t *cr, const int width, const int height, con
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** stop square box */
|
/** stop square box */
|
||||||
static void icon_transport_stop (cairo_t *cr, const int width, const int height)
|
static void
|
||||||
|
icon_transport_stop (cairo_t* cr, const int width, const int height)
|
||||||
{
|
{
|
||||||
const int wh = std::min (width, height);
|
const int wh = std::min (width, height);
|
||||||
cairo_rectangle (cr,
|
cairo_rectangle (cr,
|
||||||
|
|
@ -531,7 +540,8 @@ static void icon_transport_stop (cairo_t *cr, const int width, const int height)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** play triangle */
|
/** play triangle */
|
||||||
static void icon_transport_play (cairo_t *cr, const int width, const int height)
|
static void
|
||||||
|
icon_transport_play (cairo_t* cr, const int width, const int height)
|
||||||
{
|
{
|
||||||
const int wh = std::min (width, height) * .5;
|
const int wh = std::min (width, height) * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -548,7 +558,8 @@ static void icon_transport_play (cairo_t *cr, const int width, const int height)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Midi Panic "!" */
|
/** Midi Panic "!" */
|
||||||
static void icon_transport_panic (cairo_t *cr, const int width, const int height)
|
static void
|
||||||
|
icon_transport_panic (cairo_t* cr, const int width, const int height)
|
||||||
{
|
{
|
||||||
const int wh = ceil (std::min (width, height) * .1) - .5;
|
const int wh = ceil (std::min (width, height) * .1) - .5;
|
||||||
const double xc = rint (width * .5);
|
const double xc = rint (width * .5);
|
||||||
|
|
@ -564,7 +575,8 @@ static void icon_transport_panic (cairo_t *cr, const int width, const int height
|
||||||
}
|
}
|
||||||
|
|
||||||
/** various combinations of lines and triangles "|>|", ">|" "|>" */
|
/** various combinations of lines and triangles "|>|", ">|" "|>" */
|
||||||
static void icon_transport_ck (cairo_t *cr,
|
static void
|
||||||
|
icon_transport_ck (cairo_t* cr,
|
||||||
const enum ArdourWidgets::ArdourIcon::Icon icon,
|
const enum ArdourWidgets::ArdourIcon::Icon icon,
|
||||||
const int width, const int height)
|
const int width, const int height)
|
||||||
{
|
{
|
||||||
|
|
@ -608,7 +620,8 @@ static void icon_transport_ck (cairo_t *cr,
|
||||||
}
|
}
|
||||||
|
|
||||||
/** loop spiral */
|
/** loop spiral */
|
||||||
static void icon_transport_loop (cairo_t *cr, const int width, const int height)
|
static void
|
||||||
|
icon_transport_loop (cairo_t* cr, const int width, const int height)
|
||||||
{
|
{
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -637,7 +650,8 @@ static void icon_transport_loop (cairo_t *cr, const int width, const int height)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** de-construct thorwil's metronom */
|
/** de-construct thorwil's metronom */
|
||||||
static void icon_transport_metronom (cairo_t *cr, const int width, const int height)
|
static void
|
||||||
|
icon_transport_metronom (cairo_t* cr, const int width, const int height)
|
||||||
{
|
{
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -690,7 +704,8 @@ static void icon_transport_metronom (cairo_t *cr, const int width, const int hei
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Zoom: In "+", Out "-" and Full "[]"
|
* Zoom: In "+", Out "-" and Full "[]"
|
||||||
*/
|
*/
|
||||||
static void icon_zoom (cairo_t *cr, const enum ArdourWidgets::ArdourIcon::Icon icon, const int width, const int height, const uint32_t fg_color)
|
static void
|
||||||
|
icon_zoom (cairo_t* cr, const enum ArdourWidgets::ArdourIcon::Icon icon, const int width, const int height, const uint32_t fg_color)
|
||||||
{
|
{
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -762,7 +777,8 @@ static void icon_zoom (cairo_t *cr, const enum ArdourWidgets::ArdourIcon::Icon i
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Toolbar icon - Mixbus Zoom Expand, rotated TimeAxisExpand */
|
/** Toolbar icon - Mixbus Zoom Expand, rotated TimeAxisExpand */
|
||||||
static void icon_zoom_expand (cairo_t *cr, const int width, const int height)
|
static void
|
||||||
|
icon_zoom_expand (cairo_t* cr, const int width, const int height)
|
||||||
{
|
{
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -801,7 +817,8 @@ static void icon_zoom_expand (cairo_t *cr, const int width, const int height)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** "close" - "X" , no outline */
|
/** "close" - "X" , no outline */
|
||||||
static void icon_close_cross (cairo_t *cr, const int width, const int height, const uint32_t fg_color)
|
static void
|
||||||
|
icon_close_cross (cairo_t* cr, const int width, const int height, const uint32_t fg_color)
|
||||||
{
|
{
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -816,7 +833,8 @@ static void icon_close_cross (cairo_t *cr, const int width, const int height, co
|
||||||
}
|
}
|
||||||
|
|
||||||
/** "hide" strike through eye */
|
/** "hide" strike through eye */
|
||||||
static void icon_hide_eye (cairo_t *cr, const int width, const int height, const uint32_t fg_color)
|
static void
|
||||||
|
icon_hide_eye (cairo_t* cr, const int width, const int height, const uint32_t fg_color)
|
||||||
{
|
{
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -842,7 +860,8 @@ static void icon_hide_eye (cairo_t *cr, const int width, const int height, const
|
||||||
}
|
}
|
||||||
|
|
||||||
/** slim "<" */
|
/** slim "<" */
|
||||||
static void icon_scroll_left (cairo_t *cr, const int width, const int height, const uint32_t fg_color)
|
static void
|
||||||
|
icon_scroll_left (cairo_t* cr, const int width, const int height, const uint32_t fg_color)
|
||||||
{
|
{
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -858,9 +877,9 @@ static void icon_scroll_left (cairo_t *cr, const int width, const int height, co
|
||||||
}
|
}
|
||||||
|
|
||||||
/** slim ">" */
|
/** slim ">" */
|
||||||
static void icon_scroll_right (cairo_t *cr, const int width, const int height, const uint32_t fg_color)
|
static void
|
||||||
|
icon_scroll_right (cairo_t* cr, const int width, const int height, const uint32_t fg_color)
|
||||||
{
|
{
|
||||||
|
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
const double wh = std::min (x, y);
|
const double wh = std::min (x, y);
|
||||||
|
|
@ -875,7 +894,8 @@ static void icon_scroll_right (cairo_t *cr, const int width, const int height, c
|
||||||
}
|
}
|
||||||
|
|
||||||
/** "<" */
|
/** "<" */
|
||||||
static void icon_nudge_left (cairo_t *cr, const int width, const int height, const uint32_t fg_color)
|
static void
|
||||||
|
icon_nudge_left (cairo_t* cr, const int width, const int height, const uint32_t fg_color)
|
||||||
{
|
{
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -891,9 +911,9 @@ static void icon_nudge_left (cairo_t *cr, const int width, const int height, con
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ">" */
|
/** ">" */
|
||||||
static void icon_nudge_right (cairo_t *cr, const int width, const int height, const uint32_t fg_color)
|
static void
|
||||||
|
icon_nudge_right (cairo_t* cr, const int width, const int height, const uint32_t fg_color)
|
||||||
{
|
{
|
||||||
|
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
const double wh = std::min (x, y);
|
const double wh = std::min (x, y);
|
||||||
|
|
@ -905,10 +925,10 @@ static void icon_nudge_right (cairo_t *cr, const int width, const int height, co
|
||||||
cairo_line_to (cr, x + tri_x, y);
|
cairo_line_to (cr, x + tri_x, y);
|
||||||
cairo_line_to (cr, x - tri_x, y + tri_y);
|
cairo_line_to (cr, x - tri_x, y + tri_y);
|
||||||
VECTORICONSTROKEOUTLINE (.5 + DEFAULT_LINE_WIDTH, fg_color);
|
VECTORICONSTROKEOUTLINE (.5 + DEFAULT_LINE_WIDTH, fg_color);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void icon_plus_sign (cairo_t *cr, const int width, const int height, const uint32_t fg_color)
|
static void
|
||||||
|
icon_plus_sign (cairo_t* cr, const int width, const int height, const uint32_t fg_color)
|
||||||
{
|
{
|
||||||
const double lw = DEFAULT_LINE_WIDTH;
|
const double lw = DEFAULT_LINE_WIDTH;
|
||||||
const double lc = fmod (lw * .5, 1.0);
|
const double lc = fmod (lw * .5, 1.0);
|
||||||
|
|
@ -923,7 +943,8 @@ static void icon_plus_sign (cairo_t *cr, const int width, const int height, cons
|
||||||
cairo_fill (cr);
|
cairo_fill (cr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void icon_shaded_plus_sign (cairo_t *cr, const int width, const int height, const uint32_t fg_color)
|
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 (10., ceil (std::min (width, height) * .035));
|
const double lw = std::min (10., ceil (std::min (width, height) * .035));
|
||||||
const double ln = std::min (57., rint (std::min (width, height) * .2));
|
const double ln = std::min (57., rint (std::min (width, height) * .2));
|
||||||
|
|
@ -934,13 +955,14 @@ static void icon_shaded_plus_sign (cairo_t *cr, const int width, const int heigh
|
||||||
cairo_rectangle (cr, xc - lw * .5, yc - ln, lw, ln * 2);
|
cairo_rectangle (cr, xc - lw * .5, yc - ln, lw, ln * 2);
|
||||||
cairo_rectangle (cr, xc - ln, yc - lw * .5, ln * 2, lw);
|
cairo_rectangle (cr, xc - ln, yc - lw * .5, ln * 2, lw);
|
||||||
|
|
||||||
int alpha = lw == 1 ? 0x80 : 0x20;
|
int alpha = lw <= 1 ? 0x80 : 0x20;
|
||||||
Gtkmm2ext::set_source_rgba (cr, (fg_color & 0xffffff00) | alpha);
|
Gtkmm2ext::set_source_rgba (cr, (fg_color & 0xffffff00) | alpha);
|
||||||
cairo_fill (cr);
|
cairo_fill (cr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** mixer strip narrow/wide */
|
/** mixer strip narrow/wide */
|
||||||
static void icon_strip_width (cairo_t *cr, const int width, const int height, const uint32_t fg_color)
|
static void
|
||||||
|
icon_strip_width (cairo_t* cr, const int width, const int height, const uint32_t fg_color)
|
||||||
{
|
{
|
||||||
const double lw = DEFAULT_LINE_WIDTH;
|
const double lw = DEFAULT_LINE_WIDTH;
|
||||||
const double xm = rint (width * .5) - lw * .5;
|
const double xm = rint (width * .5) - lw * .5;
|
||||||
|
|
@ -985,7 +1007,8 @@ static void icon_strip_width (cairo_t *cr, const int width, const int height, co
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 5-pin DIN MIDI socket */
|
/** 5-pin DIN MIDI socket */
|
||||||
static void icon_din_midi (cairo_t *cr, const int width, const int height, const uint32_t fg_color)
|
static void
|
||||||
|
icon_din_midi (cairo_t* cr, const int width, const int height, const uint32_t fg_color)
|
||||||
{
|
{
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -1017,7 +1040,8 @@ static void icon_din_midi (cairo_t *cr, const int width, const int height, const
|
||||||
* Plugin Window Buttons
|
* Plugin Window Buttons
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void icon_add_sign (cairo_t *cr, const int width, const int height, const uint32_t fg_color)
|
static void
|
||||||
|
icon_add_sign (cairo_t* cr, const int width, const int height, const uint32_t fg_color)
|
||||||
{
|
{
|
||||||
const double lw = DEFAULT_LINE_WIDTH;
|
const double lw = DEFAULT_LINE_WIDTH;
|
||||||
const double lc = fmod (lw * .5, 1.0);
|
const double lc = fmod (lw * .5, 1.0);
|
||||||
|
|
@ -1032,7 +1056,8 @@ static void icon_add_sign (cairo_t *cr, const int width, const int height, const
|
||||||
cairo_fill (cr);
|
cairo_fill (cr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void icon_no_parking (cairo_t *cr, const int width, const int height, const uint32_t fg_color)
|
static void
|
||||||
|
icon_no_parking (cairo_t* cr, const int width, const int height, const uint32_t fg_color)
|
||||||
{
|
{
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -1044,7 +1069,8 @@ static void icon_no_parking (cairo_t *cr, const int width, const int height, con
|
||||||
VECTORICONSTROKE (DEFAULT_LINE_WIDTH, fg_color);
|
VECTORICONSTROKE (DEFAULT_LINE_WIDTH, fg_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void icon_save_arrow_box (cairo_t *cr, const int width, const int height, const uint32_t fg_color)
|
static void
|
||||||
|
icon_save_arrow_box (cairo_t* cr, const int width, const int height, const uint32_t fg_color)
|
||||||
{
|
{
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -1078,7 +1104,8 @@ static void icon_save_arrow_box (cairo_t *cr, const int width, const int height,
|
||||||
VECTORICONSTROKE (lw, fg_color);
|
VECTORICONSTROKE (lw, fg_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void icon_list_browse (cairo_t *cr, const int width, const int height, const uint32_t 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 x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -1104,7 +1131,8 @@ static void icon_list_browse (cairo_t *cr, const int width, const int height, co
|
||||||
VECTORICONSTROKE (lw, fg_color);
|
VECTORICONSTROKE (lw, fg_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void icon_on_off (cairo_t *cr, const int width, const int height, const uint32_t 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;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -1119,7 +1147,8 @@ static void icon_on_off (cairo_t *cr, const int width, const int height, const u
|
||||||
VECTORICONSTROKE (lw, fg_color);
|
VECTORICONSTROKE (lw, fg_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void icon_bypass (cairo_t *cr, const int width, const int height, const uint32_t fg_color)
|
static void
|
||||||
|
icon_bypass (cairo_t* cr, const int width, const int height, const uint32_t fg_color)
|
||||||
{
|
{
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -1150,7 +1179,8 @@ static void icon_bypass (cairo_t *cr, const int width, const int height, const u
|
||||||
VECTORICONSTROKE (pt, fg_color);
|
VECTORICONSTROKE (pt, fg_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void icon_reset_knob (cairo_t *cr, const int width, const int height, const uint32_t fg_color)
|
static void
|
||||||
|
icon_reset_knob (cairo_t* cr, const int width, const int height, const uint32_t fg_color)
|
||||||
{
|
{
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -1176,7 +1206,8 @@ static void icon_reset_knob (cairo_t *cr, const int width, const int height, con
|
||||||
VECTORICONSTROKE (lw, fg_color);
|
VECTORICONSTROKE (lw, fg_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void icon_config_wheel (cairo_t *cr, const int width, const int height, const uint32_t fg_color, int arrow)
|
static void
|
||||||
|
icon_config_wheel (cairo_t* cr, const int width, const int height, const uint32_t fg_color, int arrow)
|
||||||
{
|
{
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -1219,7 +1250,8 @@ static void icon_config_wheel (cairo_t *cr, const int width, const int height, c
|
||||||
VECTORICONSTROKE (lw, fg_color);
|
VECTORICONSTROKE (lw, fg_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void icon_pcb_via (cairo_t *cr, const int width, const int height, const uint32_t fg_color)
|
static void
|
||||||
|
icon_pcb_via (cairo_t* cr, const int width, const int height, const uint32_t fg_color)
|
||||||
{
|
{
|
||||||
const double x = ceil (width * .5) - .5;
|
const double x = ceil (width * .5) - .5;
|
||||||
const double y = ceil (height * .5) - .5;
|
const double y = ceil (height * .5) - .5;
|
||||||
|
|
@ -1242,7 +1274,8 @@ static void icon_pcb_via (cairo_t *cr, const int width, const int height, const
|
||||||
VECTORICONSTROKE (p, fg_color);
|
VECTORICONSTROKE (p, fg_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void icon_latency_clock (cairo_t *cr, const int width, const int height, const uint32_t fg_color)
|
static void
|
||||||
|
icon_latency_clock (cairo_t* cr, const int width, const int height, const uint32_t fg_color)
|
||||||
{
|
{
|
||||||
const double x = width * .5;
|
const double x = width * .5;
|
||||||
const double y = height * .5;
|
const double y = height * .5;
|
||||||
|
|
@ -1447,6 +1480,7 @@ ArdourWidgets::ArdourIcon::expose_with_text (GdkEventExpose* ev, Gtk::Widget* w,
|
||||||
int height = win->get_height ();
|
int height = win->get_height ();
|
||||||
|
|
||||||
Glib::RefPtr<Gtk::Style> style = w->get_style ();
|
Glib::RefPtr<Gtk::Style> style = w->get_style ();
|
||||||
|
|
||||||
Gdk::Color fg (style->get_fg (Gtk::STATE_NORMAL));
|
Gdk::Color fg (style->get_fg (Gtk::STATE_NORMAL));
|
||||||
const uint32_t fg_color = RGBA_TO_UINT (fg.get_red () / 255., fg.get_green () / 255, fg.get_blue () / 255, 255);
|
const uint32_t fg_color = RGBA_TO_UINT (fg.get_red () / 255., fg.get_green () / 255, fg.get_blue () / 255, 255);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue