]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkframe.c
treeview: Don't emit cursor-changed in destruction
[~andy/gtk] / gtk / gtkframe.c
index d4852fd063655c9379b6e9e788b08bc22b47c163..9b81631394c455e6d3adefe903861ab7a14d012c 100644 (file)
@@ -12,9 +12,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
 /*
@@ -32,6 +30,7 @@
 #include "gtktypebuiltins.h"
 #include "gtkintl.h"
 #include "gtkbuildable.h"
+#include "gtkwidgetpath.h"
 
 #include "a11y/gtkframeaccessible.h"
 
@@ -709,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);
@@ -719,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);