]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkframe.c
filechooserbutton: In SELECT_FOLDER, when the selection is empty, show (None) in...
[~andy/gtk] / gtk / gtkframe.c
index 23a89d79d492632c420e527bcf3af14c2b63020f..9b81631394c455e6d3adefe903861ab7a14d012c 100644 (file)
@@ -30,6 +30,7 @@
 #include "gtktypebuiltins.h"
 #include "gtkintl.h"
 #include "gtkbuildable.h"
+#include "gtkwidgetpath.h"
 
 #include "a11y/gtkframeaccessible.h"
 
@@ -707,6 +708,9 @@ gtk_frame_draw (GtkWidget *widget,
           height += height_extra;
 
           x2 = padding.left + (priv->child_allocation.width - priv->label_allocation.width - 2 * LABEL_PAD - 2 * LABEL_SIDE_PAD) * xalign + LABEL_SIDE_PAD;
+
+          gtk_render_background (context, cr, x, y, width, height);
+
           /* If the label is completely over or under the frame we can omit the gap */
           if (priv->label_yalign == 0.0 || priv->label_yalign == 1.0)
             gtk_render_frame (context, cr, x, y, width, height);
@@ -717,7 +721,14 @@ gtk_frame_draw (GtkWidget *widget,
                                   x2 + priv->label_allocation.width + 2 * LABEL_PAD);
         }
       else
-        gtk_render_frame (context, cr, x, y, width, height);
+        {
+          gtk_render_background (context, cr, x, y, width, height);
+          gtk_render_frame (context, cr, x, y, width, height);
+        }
+    }
+  else
+    {
+      gtk_render_background (context, cr, x, y, width, height);
     }
 
   GTK_WIDGET_CLASS (gtk_frame_parent_class)->draw (widget, cr);