- gtk_paint_shadow_gap (widget->style, widget->window,
- widget->state, frame->shadow_type,
- area, widget, "frame",
- x, y, width, height,
- GTK_POS_TOP,
- x2, child_requisition.width + 2 * LABEL_PAD);
+ /* If the label is completely over or under the frame we can omit the gap */
+ if (frame->label_yalign == 0.0 || frame->label_yalign == 1.0)
+ gtk_paint_shadow (widget->style, widget->window,
+ widget->state, frame->shadow_type,
+ area, widget, "frame",
+ x, y, width, height);
+ else
+ gtk_paint_shadow_gap (widget->style, widget->window,
+ widget->state, frame->shadow_type,
+ area, widget, "frame",
+ x, y, width, height,
+ GTK_POS_TOP,
+ x2, child_requisition.width + 2 * LABEL_PAD);