mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
pixel pushing: return of drop-shadows (maybe)
This commit is contained in:
parent
27ba2c7ea6
commit
26df9ccdf8
4 changed files with 113 additions and 94 deletions
|
|
@ -254,26 +254,25 @@ TriggerEntry::render (ArdourCanvas::Rect const & area, Cairo::RefPtr<Cairo::Cont
|
|||
|
||||
render_children (area, context);
|
||||
|
||||
if (_trigger.index()%2==0) {
|
||||
if (_trigger.index()==1) {
|
||||
//drop-shadow at top
|
||||
Cairo::RefPtr<Cairo::LinearGradient> drop_shadow_pattern = Cairo::LinearGradient::create (0.0, 0.0, 0.0, 6*scale);
|
||||
drop_shadow_pattern->add_color_stop_rgba (0, 0, 0, 0, 0.7);
|
||||
drop_shadow_pattern->add_color_stop_rgba (1, 0, 0, 0, 0.0);
|
||||
context->set_source (drop_shadow_pattern);
|
||||
context->rectangle(0, 0, width, 6*scale );
|
||||
context->fill ();
|
||||
} else if (_trigger.index()%2==0) {
|
||||
//line at top
|
||||
context->set_identity_matrix();
|
||||
context->translate (self.x0, self.y0-0.5);
|
||||
set_source_rgba (context, rgba_to_color (0,0,0,1));
|
||||
context->rectangle(0, 0, width, 1.);
|
||||
context->fill ();
|
||||
context->set_identity_matrix();
|
||||
}
|
||||
|
||||
{
|
||||
//line at right
|
||||
context->set_identity_matrix();
|
||||
context->translate (self.x0, self.y0-0.5);
|
||||
set_source_rgba (context, rgba_to_color (0,0,0,1));
|
||||
context->rectangle(width-1, 0, width, height);
|
||||
context->rectangle(0, 0, width, 1);
|
||||
context->fill ();
|
||||
context->set_identity_matrix();
|
||||
}
|
||||
|
||||
//follow-action icon
|
||||
if (_trigger.region()) {
|
||||
context->set_identity_matrix();
|
||||
context->translate (self.x0, self.y0-0.5);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue