Add Attachment icons
This commit is contained in:
parent
19fc6e831b
commit
f3ff1a1100
@ -1567,6 +1567,81 @@ icon_waveform (cairo_t* cr, const int width, const int height, const uint32_t fg
|
|||||||
VECTORICONSTROKE (lw, fg_color);
|
VECTORICONSTROKE (lw, fg_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* Attachment pane icons
|
||||||
|
*/
|
||||||
|
|
||||||
|
static void
|
||||||
|
icon_attachment_left (cairo_t* cr, const int width, const int height, const Gtkmm2ext::ActiveState state, const uint32_t fg_color)
|
||||||
|
{
|
||||||
|
const int wh = std::min (width, height);
|
||||||
|
cairo_rectangle (cr,
|
||||||
|
(width - wh) * .5 + wh * .2,
|
||||||
|
(height - wh) * .5 + wh * .2,
|
||||||
|
wh * .6, wh * .6);
|
||||||
|
|
||||||
|
VECTORICONSTROKE (DEFAULT_LINE_WIDTH, fg_color);
|
||||||
|
|
||||||
|
cairo_rectangle (cr,
|
||||||
|
(width - wh) * .5 + wh * .2,
|
||||||
|
(height - wh) * .5 + wh * .2,
|
||||||
|
wh * .21, wh * .6);
|
||||||
|
|
||||||
|
if (state == Gtkmm2ext::ExplicitActive) {
|
||||||
|
cairo_fill (cr);
|
||||||
|
} else {
|
||||||
|
VECTORICONSTROKE (DEFAULT_LINE_WIDTH, fg_color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
icon_attachment_right (cairo_t* cr, const int width, const int height, const Gtkmm2ext::ActiveState state, const uint32_t fg_color)
|
||||||
|
{
|
||||||
|
const int wh = std::min (width, height);
|
||||||
|
cairo_rectangle (cr,
|
||||||
|
(width - wh) * .5 + wh * .2,
|
||||||
|
(height - wh) * .5 + wh * .2,
|
||||||
|
wh * .6, wh * .6);
|
||||||
|
|
||||||
|
VECTORICONSTROKE (DEFAULT_LINE_WIDTH, fg_color);
|
||||||
|
|
||||||
|
cairo_rectangle (cr,
|
||||||
|
(width - wh) * .5 + wh * .59,
|
||||||
|
(height - wh) * .5 + wh * .2,
|
||||||
|
wh * .21, wh * .6);
|
||||||
|
|
||||||
|
if (state == Gtkmm2ext::ExplicitActive) {
|
||||||
|
cairo_fill (cr);
|
||||||
|
} else {
|
||||||
|
VECTORICONSTROKE (DEFAULT_LINE_WIDTH, fg_color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
icon_attachment_bottom (cairo_t* cr, const int width, const int height, const Gtkmm2ext::ActiveState state, const uint32_t fg_color)
|
||||||
|
{
|
||||||
|
const int wh = std::min (width, height);
|
||||||
|
cairo_rectangle (cr,
|
||||||
|
(width - wh) * .5 + wh * .2,
|
||||||
|
(height - wh) * .5 + wh * .2,
|
||||||
|
wh * .6, wh * .6);
|
||||||
|
|
||||||
|
VECTORICONSTROKE (DEFAULT_LINE_WIDTH, fg_color);
|
||||||
|
|
||||||
|
cairo_rectangle (cr,
|
||||||
|
(width - wh) * .5 + wh * .2,
|
||||||
|
(height - wh) * .5 + wh * .59,
|
||||||
|
wh * .6, wh * .21);
|
||||||
|
|
||||||
|
if (state == Gtkmm2ext::ExplicitActive) {
|
||||||
|
cairo_fill (cr);
|
||||||
|
} else {
|
||||||
|
VECTORICONSTROKE (DEFAULT_LINE_WIDTH, fg_color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
bool
|
bool
|
||||||
@ -1731,6 +1806,15 @@ ArdourWidgets::ArdourIcon::render (cairo_t* cr
|
|||||||
case TailTimeClock:
|
case TailTimeClock:
|
||||||
icon_tailtime_clock (cr, width, height, fg_color);
|
icon_tailtime_clock (cr, width, height, fg_color);
|
||||||
break;
|
break;
|
||||||
|
case AttachmentLeft:
|
||||||
|
icon_attachment_left (cr, width, height, state, fg_color);
|
||||||
|
break;
|
||||||
|
case AttachmentRight:
|
||||||
|
icon_attachment_right (cr, width, height, state, fg_color);
|
||||||
|
break;
|
||||||
|
case AttachmentBottom:
|
||||||
|
icon_attachment_bottom (cr, width, height, state, fg_color);
|
||||||
|
break;
|
||||||
case NoIcon:
|
case NoIcon:
|
||||||
rv = false;
|
rv = false;
|
||||||
break;
|
break;
|
||||||
|
@ -78,6 +78,9 @@ namespace ArdourWidgets { namespace ArdourIcon {
|
|||||||
Meters,
|
Meters,
|
||||||
TrackWaveform,
|
TrackWaveform,
|
||||||
TailTimeClock,
|
TailTimeClock,
|
||||||
|
AttachmentLeft,
|
||||||
|
AttachmentRight,
|
||||||
|
AttachmentBottom,
|
||||||
NoIcon //< Last
|
NoIcon //< Last
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user