[gtk/matthiasc/for-master: 17/22] frame: Drop shadow-type



commit b030188e51ea4768ec20edd722e2cc30828e711c
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Apr 16 23:48:15 2020 -0400

    frame: Drop shadow-type
    
    We were only using this as a boolean, so change it
    to a boolean property named has-frame.

 demos/gtk-demo/colorsel.c            |  1 -
 demos/gtk-demo/drawingarea.c         |  2 -
 demos/gtk-demo/images.c              |  5 ---
 demos/gtk-demo/listbox.ui            |  4 +-
 demos/gtk-demo/panes.c               |  3 --
 docs/reference/gtk/gtk4-sections.txt |  8 ++--
 docs/tools/widgets.c                 | 22 ++--------
 examples/drawing.c                   |  1 -
 gtk/gtkentrycompletion.c             |  2 -
 gtk/gtkframe.c                       | 78 +++++++++++++++++-------------------
 gtk/gtkframe.h                       |  6 +--
 gtk/gtkpaned.c                       |  2 -
 gtk/gtktreeviewcolumn.c              |  2 +-
 gtk/ui/gtkplacesview.ui              |  2 +-
 gtk/ui/gtkstatusbar.ui               |  2 +-
 tests/testcalendar.c                 |  2 +-
 tests/testfilechooserbutton.c        |  2 +-
 tests/testflowbox.c                  |  2 +-
 tests/testframe.c                    |  7 +---
 tests/testgtk.c                      | 13 ------
 20 files changed, 57 insertions(+), 109 deletions(-)
---
diff --git a/demos/gtk-demo/colorsel.c b/demos/gtk-demo/colorsel.c
index 465cda3c4e..33ce704fd9 100644
--- a/demos/gtk-demo/colorsel.c
+++ b/demos/gtk-demo/colorsel.c
@@ -90,7 +90,6 @@ do_colorsel (GtkWidget *do_widget)
        */
 
       frame = gtk_frame_new (NULL);
-      gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
       gtk_container_add (GTK_CONTAINER (vbox), frame);
 
       da = gtk_drawing_area_new ();
diff --git a/demos/gtk-demo/drawingarea.c b/demos/gtk-demo/drawingarea.c
index d16a417bc4..bbbe145524 100644
--- a/demos/gtk-demo/drawingarea.c
+++ b/demos/gtk-demo/drawingarea.c
@@ -214,7 +214,6 @@ do_drawingarea (GtkWidget *do_widget)
       gtk_container_add (GTK_CONTAINER (vbox), label);
 
       frame = gtk_frame_new (NULL);
-      gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
       gtk_widget_set_vexpand (frame, TRUE);
       gtk_container_add (GTK_CONTAINER (vbox), frame);
 
@@ -235,7 +234,6 @@ do_drawingarea (GtkWidget *do_widget)
 
       frame = gtk_frame_new (NULL);
       gtk_widget_set_vexpand (frame, TRUE);
-      gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
       gtk_container_add (GTK_CONTAINER (vbox), frame);
 
       da = gtk_drawing_area_new ();
diff --git a/demos/gtk-demo/images.c b/demos/gtk-demo/images.c
index df0f81700a..3e476ce1b2 100644
--- a/demos/gtk-demo/images.c
+++ b/demos/gtk-demo/images.c
@@ -360,7 +360,6 @@ do_images (GtkWidget *do_widget)
       gtk_container_add (GTK_CONTAINER (vbox), label);
 
       frame = gtk_frame_new (NULL);
-      gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
       gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
       gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
       gtk_container_add (GTK_CONTAINER (vbox), frame);
@@ -379,7 +378,6 @@ do_images (GtkWidget *do_widget)
       gtk_container_add (GTK_CONTAINER (vbox), label);
 
       frame = gtk_frame_new (NULL);
-      gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
       gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
       gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
       gtk_container_add (GTK_CONTAINER (vbox), frame);
@@ -396,7 +394,6 @@ do_images (GtkWidget *do_widget)
       gtk_container_add (GTK_CONTAINER (vbox), label);
 
       frame = gtk_frame_new (NULL);
-      gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
       gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
       gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
       gtk_container_add (GTK_CONTAINER (vbox), frame);
@@ -418,7 +415,6 @@ do_images (GtkWidget *do_widget)
       gtk_container_add (GTK_CONTAINER (vbox), label);
 
       frame = gtk_frame_new (NULL);
-      gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
       gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
       gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
       gtk_container_add (GTK_CONTAINER (vbox), frame);
@@ -441,7 +437,6 @@ do_images (GtkWidget *do_widget)
       gtk_container_add (GTK_CONTAINER (vbox), label);
 
       frame = gtk_frame_new (NULL);
-      gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
       gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
       gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
       gtk_container_add (GTK_CONTAINER (vbox), frame);
diff --git a/demos/gtk-demo/listbox.ui b/demos/gtk-demo/listbox.ui
index c6832f51b3..bd091b1c1b 100644
--- a/demos/gtk-demo/listbox.ui
+++ b/demos/gtk-demo/listbox.ui
@@ -185,7 +185,7 @@
                     <property name="spacing">8</property>
                     <child>
                       <object class="GtkFrame" id="frame1">
-                        <property name="shadow-type">none</property>
+                        <property name="has-frame">0</property>
                         <child>
                           <object class="GtkLabel" id="n_reshares_label">
                             <property name="label" translatable="0">&lt;b&gt;2&lt;/b&gt;
@@ -198,7 +198,7 @@ Reshares</property>
                     </child>
                     <child>
                       <object class="GtkFrame" id="frame2">
-                        <property name="shadow-type">none</property>
+                        <property name="has-frame">0</property>
                         <child>
                           <object class="GtkLabel" id="n_favorites_label">
                             <property name="label" translatable="0">&lt;b&gt;2&lt;/b&gt;
diff --git a/demos/gtk-demo/panes.c b/demos/gtk-demo/panes.c
index 73fbbe790c..9ed83509ee 100644
--- a/demos/gtk-demo/panes.c
+++ b/demos/gtk-demo/panes.c
@@ -172,7 +172,6 @@ do_panes (GtkWidget *do_widget)
       gtk_paned_add1 (GTK_PANED (vpaned), hpaned);
 
       frame = gtk_frame_new (NULL);
-      gtk_frame_set_shadow_type (GTK_FRAME(frame), GTK_SHADOW_IN);
       gtk_widget_set_size_request (frame, 60, 60);
       gtk_paned_add1 (GTK_PANED (hpaned), frame);
 
@@ -180,12 +179,10 @@ do_panes (GtkWidget *do_widget)
       gtk_container_add (GTK_CONTAINER(frame), button);
 
       frame = gtk_frame_new (NULL);
-      gtk_frame_set_shadow_type (GTK_FRAME(frame), GTK_SHADOW_IN);
       gtk_widget_set_size_request (frame, 80, 60);
       gtk_paned_add2 (GTK_PANED (hpaned), frame);
 
       frame = gtk_frame_new (NULL);
-      gtk_frame_set_shadow_type (GTK_FRAME(frame), GTK_SHADOW_IN);
       gtk_widget_set_size_request (frame, 60, 80);
       gtk_paned_add2 (GTK_PANED (vpaned), frame);
 
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 594692736b..a5213f04f2 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -1372,13 +1372,13 @@ GtkFrame
 GtkFrameClass
 gtk_frame_new
 gtk_frame_set_label
+gtk_frame_get_label
 gtk_frame_set_label_widget
+gtk_frame_get_label_widget
 gtk_frame_set_label_align
-gtk_frame_set_shadow_type
-gtk_frame_get_label
 gtk_frame_get_label_align
-gtk_frame_get_label_widget
-gtk_frame_get_shadow_type
+gtk_frame_set_has_frame
+gtk_frame_get_has_frame
 <SUBSECTION Standard>
 GTK_FRAME
 GTK_IS_FRAME
diff --git a/docs/tools/widgets.c b/docs/tools/widgets.c
index 64b244680f..c6f088f47f 100644
--- a/docs/tools/widgets.c
+++ b/docs/tools/widgets.c
@@ -455,7 +455,6 @@ create_text_view (void)
   GtkWidget *text_view;
 
   widget = gtk_frame_new (NULL);
-  gtk_frame_set_shadow_type (GTK_FRAME (widget), GTK_SHADOW_IN);
   text_view = gtk_text_view_new ();
   gtk_container_add (GTK_CONTAINER (widget), text_view);
   /* Bad hack to add some size to the widget */
@@ -476,7 +475,6 @@ create_tree_view (void)
   WidgetInfo *info;
 
   widget = gtk_frame_new (NULL);
-  gtk_frame_set_shadow_type (GTK_FRAME (widget), GTK_SHADOW_IN);
   store = gtk_tree_store_new (3, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_STRING);
   gtk_tree_store_append (store, &iter, NULL);
   gtk_tree_store_set (store, &iter, 0, "Line One", 1, FALSE, 2, "A", -1);
@@ -520,7 +518,6 @@ create_icon_view (void)
   WidgetInfo *info;
 
   widget = gtk_frame_new (NULL);
-  gtk_frame_set_shadow_type (GTK_FRAME (widget), GTK_SHADOW_IN);
   list_store = gtk_list_store_new (2, G_TYPE_STRING, GDK_TYPE_PIXBUF);
   gtk_list_store_append (list_store, &iter);
   pixbuf = gdk_pixbuf_new_from_file ("folder.png", NULL);
@@ -665,27 +662,19 @@ create_panes (void)
   gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
   pane = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
   gtk_paned_pack1 (GTK_PANED (pane),
-                  g_object_new (GTK_TYPE_FRAME,
-                                "shadow-type", GTK_SHADOW_IN,
-                                NULL),
+                  g_object_new (GTK_TYPE_FRAME, NULL),
                   FALSE, FALSE);
   gtk_paned_pack2 (GTK_PANED (pane),
-                  g_object_new (GTK_TYPE_FRAME,
-                                "shadow-type", GTK_SHADOW_IN,
-                                NULL),
+                  g_object_new (GTK_TYPE_FRAME, NULL),
                   FALSE, FALSE);
   gtk_container_add (GTK_CONTAINER (hbox),
                      pane);
   pane = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
   gtk_paned_pack1 (GTK_PANED (pane),
-                  g_object_new (GTK_TYPE_FRAME,
-                                "shadow-type", GTK_SHADOW_IN,
-                                NULL),
+                  g_object_new (GTK_TYPE_FRAME, NULL),
                   FALSE, FALSE);
   gtk_paned_pack2 (GTK_PANED (pane),
-                  g_object_new (GTK_TYPE_FRAME,
-                                "shadow-type", GTK_SHADOW_IN,
-                                NULL),
+                  g_object_new (GTK_TYPE_FRAME, NULL),
                   FALSE, FALSE);
   gtk_container_add (GTK_CONTAINER (hbox),
                      pane);
@@ -1259,7 +1248,6 @@ create_list_box (void)
   WidgetInfo *info;
 
   widget = gtk_frame_new (NULL);
-  gtk_frame_set_shadow_type (GTK_FRAME (widget), GTK_SHADOW_IN);
 
   list = gtk_list_box_new ();
   gtk_list_box_set_selection_mode (GTK_LIST_BOX (list), GTK_SELECTION_BROWSE);
@@ -1312,7 +1300,6 @@ create_flow_box (void)
   WidgetInfo *info;
 
   widget = gtk_frame_new (NULL);
-  gtk_frame_set_shadow_type (GTK_FRAME (widget), GTK_SHADOW_IN);
 
   box = gtk_flow_box_new ();
   gtk_flow_box_set_min_children_per_line (GTK_FLOW_BOX (box), 2);
@@ -1351,7 +1338,6 @@ create_gl_area (void)
   GtkWidget *gears;
 
   widget = gtk_frame_new (NULL);
-  gtk_frame_set_shadow_type (GTK_FRAME (widget), GTK_SHADOW_IN);
 
   gears = gtk_gears_new ();
   gtk_container_add (GTK_CONTAINER (widget), gears);
diff --git a/examples/drawing.c b/examples/drawing.c
index f5315aebb7..37c439c904 100644
--- a/examples/drawing.c
+++ b/examples/drawing.c
@@ -143,7 +143,6 @@ activate (GtkApplication *app,
   g_signal_connect (window, "destroy", G_CALLBACK (close_window), NULL);
 
   frame = gtk_frame_new (NULL);
-  gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
   gtk_container_add (GTK_CONTAINER (window), frame);
 
   drawing_area = gtk_drawing_area_new ();
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c
index a7fc1f649d..0803dc6173 100644
--- a/gtk/gtkentrycompletion.c
+++ b/gtk/gtkentrycompletion.c
@@ -600,8 +600,6 @@ gtk_entry_completion_constructed (GObject *object)
   gtk_widget_add_controller (priv->popup_window, controller);
 
   popup_frame = gtk_frame_new (NULL);
-  gtk_frame_set_shadow_type (GTK_FRAME (popup_frame),
-                             GTK_SHADOW_ETCHED_IN);
   gtk_container_add (GTK_CONTAINER (priv->popup_window), popup_frame);
 
   priv->vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c
index 961c4a23b3..3e6136f535 100644
--- a/gtk/gtkframe.c
+++ b/gtk/gtkframe.c
@@ -81,9 +81,7 @@
  * like “border-style” on this node.
  *
  * The node can be given the style class “.flat”, which is used by themes to
- * disable drawing of the border. To do this from code, call
- * gtk_frame_set_shadow_type() with %GTK_SHADOW_NONE to add the “.flat” class or
- * any other shadow type to remove it.
+ * disable drawing of the border. To do this from code, call gtk_frame_set_has_frame().
  */
 
 typedef struct
@@ -91,7 +89,7 @@ typedef struct
   /* Properties */
   GtkWidget *label_widget;
 
-  gint16 shadow_type;
+  guint has_frame : 1;
   gfloat label_xalign;
 } GtkFramePrivate;
 
@@ -99,7 +97,7 @@ enum {
   PROP_0,
   PROP_LABEL,
   PROP_LABEL_XALIGN,
-  PROP_SHADOW_TYPE,
+  PROP_HAS_FRAME,
   PROP_LABEL_WIDGET,
   LAST_PROP
 };
@@ -177,13 +175,12 @@ gtk_frame_class_init (GtkFrameClass *class)
                           0.0,
                           GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
 
-  frame_props[PROP_SHADOW_TYPE] =
-      g_param_spec_enum ("shadow-type",
-                         P_("Frame shadow"),
-                         P_("Appearance of the frame"),
-                       GTK_TYPE_SHADOW_TYPE,
-                       GTK_SHADOW_ETCHED_IN,
-                        GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
+  frame_props[PROP_HAS_FRAME] =
+      g_param_spec_boolean ("has-frame",
+                            P_("Has Frame"),
+                            P_("Whether to draw a visible frame"),
+                           TRUE,       
+                            GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
 
   frame_props[PROP_LABEL_WIDGET] =
       g_param_spec_object ("label-widget",
@@ -234,7 +231,7 @@ gtk_frame_init (GtkFrame *frame)
   GtkFramePrivate *priv = gtk_frame_get_instance_private (frame);
 
   priv->label_widget = NULL;
-  priv->shadow_type = GTK_SHADOW_ETCHED_IN;
+  priv->has_frame = TRUE;
   priv->label_xalign = 0.0;
 }
 
@@ -254,8 +251,8 @@ gtk_frame_set_property (GObject         *object,
     case PROP_LABEL_XALIGN:
       gtk_frame_set_label_align (frame, g_value_get_float (value));
      break;
-    case PROP_SHADOW_TYPE:
-      gtk_frame_set_shadow_type (frame, g_value_get_enum (value));
+    case PROP_HAS_FRAME:
+      gtk_frame_set_has_frame (frame, g_value_get_boolean (value));
       break;
     case PROP_LABEL_WIDGET:
       gtk_frame_set_label_widget (frame, g_value_get_object (value));
@@ -283,8 +280,8 @@ gtk_frame_get_property (GObject         *object,
     case PROP_LABEL_XALIGN:
       g_value_set_float (value, priv->label_xalign);
       break;
-    case PROP_SHADOW_TYPE:
-      g_value_set_enum (value, priv->shadow_type);
+    case PROP_HAS_FRAME:
+      g_value_set_boolean (value, priv->has_frame);
       break;
     case PROP_LABEL_WIDGET:
       g_value_set_object (value,
@@ -512,53 +509,50 @@ gtk_frame_get_label_align (GtkFrame *frame)
 }
 
 /**
- * gtk_frame_set_shadow_type:
+ * gtk_frame_set_has_frame:
  * @frame: a #GtkFrame
- * @type: the new #GtkShadowType
+ * @has_frame: %TRUE to draw a frame
  * 
- * Sets the #GtkFrame:shadow-type for @frame, i.e. whether it is drawn without
- * (%GTK_SHADOW_NONE) or with (other values) a visible border. Values other than
- * %GTK_SHADOW_NONE are treated identically by GtkFrame. The chosen type is
- * applied by removing or adding the .flat class to the main CSS node, frame.
+ * Sets whether the is drawn with or without a visible border.
  **/
 void
-gtk_frame_set_shadow_type (GtkFrame      *frame,
-                          GtkShadowType  type)
+gtk_frame_set_has_frame (GtkFrame *frame,
+                        gboolean  has_frame)
 {
   GtkFramePrivate *priv = gtk_frame_get_instance_private (frame);
 
   g_return_if_fail (GTK_IS_FRAME (frame));
 
-  if ((GtkShadowType) priv->shadow_type != type)
-    {
-      priv->shadow_type = type;
+  if (priv->has_frame == has_frame)
+    return;
 
-      if (type == GTK_SHADOW_NONE)
-        gtk_widget_add_css_class (GTK_WIDGET (frame), "flat");
-      else
-        gtk_widget_remove_css_class (GTK_WIDGET (frame), "flat");
+  priv->has_frame = has_frame;
 
-      g_object_notify_by_pspec (G_OBJECT (frame), frame_props[PROP_SHADOW_TYPE]);
-    }
+  if (has_frame)
+    gtk_widget_remove_css_class (GTK_WIDGET (frame), "flat");
+  else
+    gtk_widget_add_css_class (GTK_WIDGET (frame), "flat");
+
+  g_object_notify_by_pspec (G_OBJECT (frame), frame_props[PROP_HAS_FRAME]);
 }
 
 /**
- * gtk_frame_get_shadow_type:
+ * gtk_frame_get_has_frame:
  * @frame: a #GtkFrame
  *
- * Retrieves the shadow type of the frame. See
- * gtk_frame_set_shadow_type().
+ * Retrieves whether the frame is drawn visibly.
+ * See gtk_frame_set_has_frame().
  *
- * Returns: the current shadow type of the frame.
+ * Returns: %TRUE if @frame is drawn visibly
  **/
-GtkShadowType
-gtk_frame_get_shadow_type (GtkFrame *frame)
+gboolean
+gtk_frame_get_has_frame (GtkFrame *frame)
 {
   GtkFramePrivate *priv = gtk_frame_get_instance_private (frame);
 
-  g_return_val_if_fail (GTK_IS_FRAME (frame), GTK_SHADOW_ETCHED_IN);
+  g_return_val_if_fail (GTK_IS_FRAME (frame), TRUE);
 
-  return priv->shadow_type;
+  return priv->has_frame;
 }
 
 static void
diff --git a/gtk/gtkframe.h b/gtk/gtkframe.h
index a02a3c8323..45a5165e7c 100644
--- a/gtk/gtkframe.h
+++ b/gtk/gtkframe.h
@@ -93,10 +93,10 @@ void       gtk_frame_set_label_align  (GtkFrame      *frame,
 GDK_AVAILABLE_IN_ALL
 gfloat     gtk_frame_get_label_align  (GtkFrame      *frame);
 GDK_AVAILABLE_IN_ALL
-void       gtk_frame_set_shadow_type  (GtkFrame      *frame,
-                                      GtkShadowType  type);
+void       gtk_frame_set_has_frame    (GtkFrame      *frame,
+                                      gboolean       has_frame);
 GDK_AVAILABLE_IN_ALL
-GtkShadowType gtk_frame_get_shadow_type (GtkFrame    *frame);
+gboolean   gtk_frame_get_has_frame    (GtkFrame    *frame);
 
 
 G_END_DECLS
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index 59db55efd7..19ffa164f7 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -106,8 +106,6 @@
  * GtkWidget *hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
  * GtkWidget *frame1 = gtk_frame_new (NULL);
  * GtkWidget *frame2 = gtk_frame_new (NULL);
- * gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_IN);
- * gtk_frame_set_shadow_type (GTK_FRAME (frame2), GTK_SHADOW_IN);
  *
  * gtk_widget_set_size_request (hpaned, 200, -1);
  *
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c
index d5152fdecb..30e468ff7b 100644
--- a/gtk/gtktreeviewcolumn.c
+++ b/gtk/gtktreeviewcolumn.c
@@ -870,7 +870,7 @@ gtk_tree_view_column_create_button (GtkTreeViewColumn *tree_column)
   gtk_widget_add_controller (priv->button, controller);
 
   priv->frame = gtk_frame_new (NULL);
-  gtk_frame_set_shadow_type (GTK_FRAME (priv->frame), GTK_SHADOW_NONE);
+  gtk_frame_set_has_frame (GTK_FRAME (priv->frame), FALSE);
   gtk_widget_set_hexpand (priv->frame, TRUE);
   gtk_widget_set_halign (priv->frame, GTK_ALIGN_START);
 
diff --git a/gtk/ui/gtkplacesview.ui b/gtk/ui/gtkplacesview.ui
index b612d900de..eb0d524c55 100644
--- a/gtk/ui/gtkplacesview.ui
+++ b/gtk/ui/gtkplacesview.ui
@@ -182,7 +182,7 @@
             <property name="name">browse</property>
             <property name="child">
               <object class="GtkFrame">
-                <property name="shadow-type">none</property>
+                <property name="has-frame">0</property>
                 <child>
                   <object class="GtkScrolledWindow">
                     <property name="hexpand">1</property>
diff --git a/gtk/ui/gtkstatusbar.ui b/gtk/ui/gtkstatusbar.ui
index bbd871594d..f41276f3e0 100644
--- a/gtk/ui/gtkstatusbar.ui
+++ b/gtk/ui/gtkstatusbar.ui
@@ -3,7 +3,7 @@
   <template class="GtkStatusbar" parent="GtkWidget">
     <child>
       <object class="GtkFrame" id="frame">
-        <property name="shadow-type">none</property>
+        <property name="has-frame">0</property>
         <property name="hexpand">1</property>
         <child>
           <object class="GtkBox" id="message_area">
diff --git a/tests/testcalendar.c b/tests/testcalendar.c
index 443e7cc91a..38cd00bdcc 100644
--- a/tests/testcalendar.c
+++ b/tests/testcalendar.c
@@ -155,7 +155,7 @@ create_frame (const char *caption,
                 "halign", halign,
                 "valign", valign,
                 NULL);
-  gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
+  gtk_frame_set_has_frame (GTK_FRAME (frame), FALSE);
   gtk_label_set_markup (GTK_LABEL (label), caption);
 
   gtk_container_add (GTK_CONTAINER (frame), child);
diff --git a/tests/testfilechooserbutton.c b/tests/testfilechooserbutton.c
index da1d6e708c..d8d6c5aec2 100644
--- a/tests/testfilechooserbutton.c
+++ b/tests/testfilechooserbutton.c
@@ -311,7 +311,7 @@ main (int   argc,
   gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (win))), vbox);
 
   frame = gtk_frame_new ("<b>GtkFileChooserButton</b>");
-  gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
+  gtk_frame_set_has_frame (GTK_FRAME (frame), FALSE);
   gtk_label_set_use_markup (GTK_LABEL (gtk_frame_get_label_widget (GTK_FRAME (frame))), TRUE);
   gtk_container_add (GTK_CONTAINER (vbox), frame);
 
diff --git a/tests/testflowbox.c b/tests/testflowbox.c
index 91d178753a..d20bc4399a 100644
--- a/tests/testflowbox.c
+++ b/tests/testflowbox.c
@@ -71,7 +71,7 @@ populate_flowbox_focus (GtkFlowBox *flowbox)
     {
       sensitive = TRUE;
       frame = gtk_frame_new (NULL);
-      gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
+      gtk_frame_set_has_frame (GTK_FRAME (frame), FALSE);
 
       box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
       gtk_container_add (GTK_CONTAINER (frame), box);
diff --git a/tests/testframe.c b/tests/testframe.c
index 63f8e6d195..5af7987c48 100644
--- a/tests/testframe.c
+++ b/tests/testframe.c
@@ -118,10 +118,7 @@ spin_xalign_cb (GtkSpinButton *spin, GtkFrame *frame)
 static void
 draw_border_cb (GtkToggleButton *toggle_button, GtkFrame *frame)
 {
-  GtkShadowType shadow_type = gtk_toggle_button_get_active (toggle_button)
-                              ? GTK_SHADOW_IN : GTK_SHADOW_NONE;
-
-  gtk_frame_set_shadow_type (frame, shadow_type);
+  gtk_frame_set_has_frame (frame, gtk_toggle_button_get_active (toggle_button));
 }
 
 static void
@@ -201,7 +198,7 @@ int main (int argc, char **argv)
   gtk_grid_attach (grid, widget, 1, 2, 1, 1);
 
   /* CheckButton to control whether to draw border */
-  draw_border = gtk_frame_get_shadow_type (frame) != GTK_SHADOW_NONE;
+  draw_border = gtk_frame_get_has_frame (frame);
   widget = gtk_check_button_new_with_label ("draw border");
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), draw_border);
   g_signal_connect (widget, "toggled", G_CALLBACK (draw_border_cb), frame);
diff --git a/tests/testgtk.c b/tests/testgtk.c
index 61b66b69fc..a08d50010d 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -4230,7 +4230,6 @@ create_panes (GtkWidget *widget)
       gtk_paned_add1 (GTK_PANED (vpaned), hpaned);
 
       frame = gtk_frame_new (NULL);
-      gtk_frame_set_shadow_type (GTK_FRAME(frame), GTK_SHADOW_IN);
       gtk_widget_set_size_request (frame, 60, 60);
       gtk_paned_add1 (GTK_PANED (hpaned), frame);
       
@@ -4238,12 +4237,10 @@ create_panes (GtkWidget *widget)
       gtk_container_add (GTK_CONTAINER(frame), button);
 
       frame = gtk_frame_new (NULL);
-      gtk_frame_set_shadow_type (GTK_FRAME(frame), GTK_SHADOW_IN);
       gtk_widget_set_size_request (frame, 80, 60);
       gtk_paned_add2 (GTK_PANED (hpaned), frame);
 
       frame = gtk_frame_new (NULL);
-      gtk_frame_set_shadow_type (GTK_FRAME(frame), GTK_SHADOW_IN);
       gtk_widget_set_size_request (frame, 60, 80);
       gtk_paned_add2 (GTK_PANED (vpaned), frame);
 
@@ -4308,7 +4305,6 @@ paned_keyboard_window1 (GtkWidget *widget)
 
   frame1 = gtk_frame_new (NULL);
   gtk_paned_pack1 (GTK_PANED (hpaned1), frame1, FALSE, TRUE);
-  gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_IN);
 
   vbox1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
   gtk_container_add (GTK_CONTAINER (frame1), vbox1);
@@ -4327,7 +4323,6 @@ paned_keyboard_window1 (GtkWidget *widget)
 
   frame2 = gtk_frame_new (NULL);
   gtk_paned_pack1 (GTK_PANED (vpaned1), frame2, FALSE, TRUE);
-  gtk_frame_set_shadow_type (GTK_FRAME (frame2), GTK_SHADOW_IN);
 
   frame5 = gtk_frame_new (NULL);
   gtk_container_add (GTK_CONTAINER (frame2), frame5);
@@ -4343,7 +4338,6 @@ paned_keyboard_window1 (GtkWidget *widget)
 
   frame3 = gtk_frame_new (NULL);
   gtk_paned_pack2 (GTK_PANED (vpaned1), frame3, TRUE, TRUE);
-  gtk_frame_set_shadow_type (GTK_FRAME (frame3), GTK_SHADOW_IN);
 
   frame4 = gtk_frame_new ("Buttons");
   gtk_container_add (GTK_CONTAINER (frame3), frame4);
@@ -4392,7 +4386,6 @@ paned_keyboard_window2 (GtkWidget *widget)
 
   frame6 = gtk_frame_new (NULL);
   gtk_paned_pack1 (GTK_PANED (hpaned2), frame6, FALSE, TRUE);
-  gtk_frame_set_shadow_type (GTK_FRAME (frame6), GTK_SHADOW_IN);
 
   button13 = gtk_button_new_with_label ("button13");
   gtk_container_add (GTK_CONTAINER (frame6), button13);
@@ -4405,14 +4398,12 @@ paned_keyboard_window2 (GtkWidget *widget)
 
   frame7 = gtk_frame_new (NULL);
   gtk_paned_pack1 (GTK_PANED (vpaned2), frame7, FALSE, TRUE);
-  gtk_frame_set_shadow_type (GTK_FRAME (frame7), GTK_SHADOW_IN);
 
   button12 = gtk_button_new_with_label ("button12");
   gtk_container_add (GTK_CONTAINER (frame7), button12);
 
   frame8 = gtk_frame_new (NULL);
   gtk_paned_pack2 (GTK_PANED (vpaned2), frame8, TRUE, TRUE);
-  gtk_frame_set_shadow_type (GTK_FRAME (frame8), GTK_SHADOW_IN);
 
   button11 = gtk_button_new_with_label ("button11");
   gtk_container_add (GTK_CONTAINER (frame8), button11);
@@ -4460,7 +4451,6 @@ paned_keyboard_window3 (GtkWidget *widget)
 
   frame9 = gtk_frame_new (NULL);
   gtk_paned_pack1 (GTK_PANED (hpaned3), frame9, FALSE, TRUE);
-  gtk_frame_set_shadow_type (GTK_FRAME (frame9), GTK_SHADOW_IN);
 
   button14 = gtk_button_new_with_label ("button14");
   gtk_container_add (GTK_CONTAINER (frame9), button14);
@@ -4470,7 +4460,6 @@ paned_keyboard_window3 (GtkWidget *widget)
 
   frame10 = gtk_frame_new (NULL);
   gtk_paned_pack1 (GTK_PANED (hpaned4), frame10, FALSE, TRUE);
-  gtk_frame_set_shadow_type (GTK_FRAME (frame10), GTK_SHADOW_IN);
 
   button15 = gtk_button_new_with_label ("button15");
   gtk_container_add (GTK_CONTAINER (frame10), button15);
@@ -4480,14 +4469,12 @@ paned_keyboard_window3 (GtkWidget *widget)
 
   frame11 = gtk_frame_new (NULL);
   gtk_paned_pack1 (GTK_PANED (hpaned5), frame11, FALSE, TRUE);
-  gtk_frame_set_shadow_type (GTK_FRAME (frame11), GTK_SHADOW_IN);
 
   button16 = gtk_button_new_with_label ("button16");
   gtk_container_add (GTK_CONTAINER (frame11), button16);
 
   frame12 = gtk_frame_new (NULL);
   gtk_paned_pack2 (GTK_PANED (hpaned5), frame12, TRUE, TRUE);
-  gtk_frame_set_shadow_type (GTK_FRAME (frame12), GTK_SHADOW_IN);
 
   button17 = gtk_button_new_with_label ("button17");
   gtk_container_add (GTK_CONTAINER (frame12), button17);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]