266
266
//use the base class to paint the background like a toolbar, which may be a gradient
267
267
// but only if horizontal, else the gradient usually looks really ugly
268
if (this.Orientation == Orientation.Horizontal)
269
return base.OnExposeEvent (evnt);
271
//else we paint a plain flat background to make everything even - see DockToolbarPanel.OnExposeEvent
273
GdkWindow.DrawRectangle (Style.BackgroundGC (State), true, Allocation);
268
if (this.Orientation == Orientation.Horizontal){
269
//the WIMP theme engine's rendering is a bit off, need to force it to render wider
270
int widen = MonoDevelop.Core.PropertyService.IsWindows? 1 : 0;
272
var shadowType = (ShadowType)StyleGetProperty ("shadow-type");
273
Style.PaintBox (Style, evnt.Window, State, shadowType, evnt.Area, this, "toolbar",
274
Allocation.X - widen, Allocation.Y, Allocation.Width + widen + widen, Allocation.Height);
276
//else we paint a plain flat background to make everything even - see DockToolbarPanel.OnExposeEvent
277
GdkWindow.DrawRectangle (Style.BackgroundGC (State), true, Allocation);
275
280
foreach (Widget child in Children) {
276
281
PropagateExpose (child, evnt);