protected override void DrawShape(Cairo.Context cr)
{
theme = theme ?? Hyena.Gui.Theming.ThemeEngine.CreateTheme (this);
cr.SetSourceRGBA (0, 0, 0, 0);
cr.Operator = Cairo.Operator.Source;
cr.Paint ();
var box_height = Allocation.Height - ArrowSize;
var arrow_x = (Allocation.Width - ArrowSize) / 2;
/*
cr.NewPath ();
CairoExtensions.RoundedRectangle (cr, 0, 0,
Allocation.Width, box_height, CornerRadius);
cr.Operator = Cairo.Operator.In;
cr.MoveTo (arrow_x, box_height);
cr.LineTo (Allocation.Width / 2, Allocation.Height);
cr.LineTo (arrow_x + ArrowSize, box_height);
cr.ClosePath ();
var grad = new Cairo.LinearGradient (0, 0, 0, Allocation.Height);
grad.AddColorStop (0, theme.Colors.GetWidgetColor (GtkColorClass.Background, StateType.Normal));
grad.AddColorStop (1, theme.Colors.GetWidgetColor (GtkColorClass.Background, StateType.Active));
cr.Operator = Cairo.Operator.Over;
cr.Pattern = grad;
cr.FillPreserve ();
cr.Color = theme.Colors.GetWidgetColor (GtkColorClass.Dark, StateType.Active);
cr.Stroke ();*/
double x = 0, y = 0;
double w = Allocation.Width;
double h = box_height;
double r = 20;
cr.NewPath ();
cr.MoveTo (x + r, y);
cr.LineTo (x + w - r, y);
cr.Arc (x + w - r, y + r, r, Math.PI * 1.5, Math.PI * 2);
cr.LineTo (x + w, y + h - r);
cr.Arc (x + w - r, y + h - r, r, 0, Math.PI * 0.5);
cr.LineTo (x + r, y + h);
cr.Arc (x + r, y + h - r, r, Math.PI * 0.5, Math.PI);
cr.LineTo (x, y + r);
cr.Arc (x + r, y + r, r, Math.PI, Math.PI * 1.5);
cr.ClosePath ();
cr.Color = new Cairo.Color (0, 0, 0, 1);
cr.Fill ();
//grad.Destroy ();
}