protected override bool OnDrawn(Cairo.Context cr) { var alloc = new Gdk.Rectangle() { X = 0, Y = 0, Width = Allocation.Width, Height = Allocation.Height }; theme.DrawListBackground(cr, alloc, true); theme.DrawFrameBorder(cr, alloc); return(true); }
protected override bool OnDrawn(Cairo.Context cr) { var alloc = new Gdk.Rectangle() { X = 0, Y = 0, Width = Allocation.Width, Height = Allocation.Height }; StyleContext.Save(); StyleContext.AddClass("view"); StyleContext.RenderBackground(cr, alloc.X, alloc.Y, alloc.Width, alloc.Height); theme.DrawFrameBorder(cr, alloc); StyleContext.Restore(); return(true); }
protected override bool OnExposeEvent(Gdk.EventExpose evnt) { Cairo.Context cr = null; try { var alloc = new Gdk.Rectangle() { X = Allocation.X, Y = Allocation.Y, Width = Allocation.Width, Height = Allocation.Height }; cr = Gdk.CairoHelper.Create(evnt.Window); theme.DrawListBackground(cr, alloc, true); theme.DrawFrameBorder(cr, alloc); } finally { CairoExtensions.DisposeContext(cr); } return(true); }