void RenderBackground (Cairo.Context context, Gdk.Rectangle region) { region.Inflate (-Padding, -Padding); context.RenderOuterShadow (new Gdk.Rectangle (region.X + 10, region.Y + 15, region.Width - 20, region.Height - 15), Padding, 3, .25); context.RoundedRectangle (region.X + 0.5, region.Y + 0.5, region.Width - 1, region.Height - 1, 5); using (var lg = new LinearGradient (0, region.Y, 0, region.Bottom)) { lg.AddColorStop (0, new Cairo.Color (.36, .53, .73)); lg.AddColorStop (1, new Cairo.Color (.21, .37, .54)); context.SetSource (lg); context.FillPreserve (); } context.LineWidth = 1; context.SetSourceRGB (.29, .47, .67); context.Stroke (); }
void RenderBackground (Cairo.Context context, Gdk.Rectangle region) { region.Inflate (-Padding, -Padding); context.RenderOuterShadow (new Gdk.Rectangle (region.X + 10, region.Y + 15, region.Width - 20, region.Height - 15), Padding, 3, .25); context.RoundedRectangle (region.X + 0.5, region.Y + 0.5, region.Width - 1, region.Height - 1, 5); using (var lg = new LinearGradient (0, region.Y, 0, region.Bottom)) { lg.AddColorStop (0, new Cairo.Color (.36, .53, .73)); lg.AddColorStop (1, new Cairo.Color (.21, .37, .54)); context.Pattern = lg; context.FillPreserve (); } context.Save (); context.Translate (IconPosition.X, IconPosition.Y); context.Scale (0.75, 0.75); Gdk.CairoHelper.SetSourcePixbuf (context, starburst, -starburst.Width / 2, -starburst.Height / 2); context.FillPreserve (); context.Restore (); context.LineWidth = 1; context.Color = new Cairo.Color (.29, .47, .67); context.Stroke (); }