DockySurface LoadIcon(string icon, int size) { bool monochrome = icon.StartsWith("[monochrome]"); if (monochrome) { icon = icon.Substring("[monochrome]".Length); } Gdk.Pixbuf pbuf = DockServices.Drawing.LoadIcon(icon, size); DockySurface surface = LoadIcon(pbuf, size); pbuf.Dispose(); if (monochrome) { surface.Context.Operator = Operator.Atop; double v = TextColor.GetValue(); // reduce value by 20% surface.Context.Color = TextColor.SetValue(v * .8); surface.Context.Paint(); surface.ResetContext(); } return(surface); }