[gtk/matthiasc/for-master: 11/14] button: Drop relief



commit f13bec05f05df5a99c097fd83748c9a8f1a6a6bf
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Apr 17 00:20:09 2020 -0400

    button: Drop relief
    
    We are only using this as a boolean, so change it
    to a boolean property named has-frame.

 demos/constraint-editor/constraint-editor-window.c |  6 +-
 demos/gtk-demo/demotaggedentry.c                   |  2 +-
 demos/gtk-demo/dnd.c                               | 14 ++--
 demos/gtk-demo/fishbowl.ui                         |  2 +-
 demos/gtk-demo/listbox.ui                          | 14 ++--
 demos/widget-factory/widget-factory.ui             |  8 +--
 docs/reference/gtk/gtk4-sections.txt               |  4 +-
 gtk/gtkbutton.c                                    | 75 ++++++++++------------
 gtk/gtkbutton.h                                    |  6 +-
 gtk/gtklinkbutton.c                                |  2 +-
 gtk/gtkmenubutton.c                                | 10 ++-
 gtk/gtknotebook.c                                  |  2 +-
 gtk/gtkplacesview.c                                |  2 +-
 gtk/inspector/css-editor.ui                        |  4 +-
 gtk/inspector/data-list.ui                         |  2 +-
 gtk/inspector/object-tree.c                        |  2 +-
 gtk/inspector/recorder.c                           |  4 +-
 gtk/inspector/recorder.ui                          |  8 +--
 gtk/inspector/window.ui                            |  4 +-
 gtk/ui/gtkemojichooser.ui                          | 20 +++---
 gtk/ui/gtkscalebutton.ui                           |  6 +-
 tests/testtreelistmodel.c                          |  2 +-
 testsuite/gtk/focus-chain/widget-factory.ui        |  8 +--
 testsuite/gtk/focus-chain/widget-factory2.ui       |  6 +-
 testsuite/gtk/focus-chain/widget-factory3.ui       |  8 +--
 testsuite/reftests/link-coloring.ui                |  4 +-
 26 files changed, 111 insertions(+), 114 deletions(-)
---
diff --git a/demos/constraint-editor/constraint-editor-window.c 
b/demos/constraint-editor/constraint-editor-window.c
index 4c0db5e5d2..cf2c11e2fd 100644
--- a/demos/constraint-editor/constraint-editor-window.c
+++ b/demos/constraint-editor/constraint-editor-window.c
@@ -613,19 +613,19 @@ create_widget_func (gpointer item,
   if (GTK_IS_CONSTRAINT (item) || GTK_IS_CONSTRAINT_GUIDE (item))
     {
       button = gtk_button_new_from_icon_name ("document-edit-symbolic");
-      gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
+      gtk_button_set_has_frame (GTK_BUTTON (button), FALSE);
       g_signal_connect (button, "clicked", G_CALLBACK (row_edit), win);
       g_object_set_data (G_OBJECT (row), "edit", button);
       gtk_container_add (GTK_CONTAINER (box), button);
       button = gtk_button_new_from_icon_name ("edit-delete-symbolic");
-      gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
+      gtk_button_set_has_frame (GTK_BUTTON (button), FALSE);
       g_signal_connect (button, "clicked", G_CALLBACK (row_delete), win);
       gtk_container_add (GTK_CONTAINER (box), button);
     }
   else if (GTK_IS_WIDGET (item))
     {
       button = gtk_button_new_from_icon_name ("edit-delete-symbolic");
-      gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
+      gtk_button_set_has_frame (GTK_BUTTON (button), FALSE);
       g_signal_connect (button, "clicked", G_CALLBACK (row_delete), win);
       gtk_container_add (GTK_CONTAINER (box), button);
     }
diff --git a/demos/gtk-demo/demotaggedentry.c b/demos/gtk-demo/demotaggedentry.c
index dcba5a435d..ba2b348839 100644
--- a/demos/gtk-demo/demotaggedentry.c
+++ b/demos/gtk-demo/demotaggedentry.c
@@ -472,7 +472,7 @@ demo_tagged_entry_tag_set_has_close_button (DemoTaggedEntryTag *tag,
       gtk_container_add (GTK_CONTAINER (tag->button), image);
       gtk_widget_set_halign (tag->button, GTK_ALIGN_CENTER);
       gtk_widget_set_valign (tag->button, GTK_ALIGN_CENTER);
-      gtk_button_set_relief (GTK_BUTTON (tag->button), GTK_RELIEF_NONE);
+      gtk_button_set_has_frame (GTK_BUTTON (tag->button), FALSE);
       gtk_container_add (GTK_CONTAINER (tag->box), tag->button);
       g_signal_connect (tag->button, "clicked", G_CALLBACK (on_button_clicked), tag);
     }
diff --git a/demos/gtk-demo/dnd.c b/demos/gtk-demo/dnd.c
index c9491ae958..118f0f5ec8 100644
--- a/demos/gtk-demo/dnd.c
+++ b/demos/gtk-demo/dnd.c
@@ -279,11 +279,11 @@ pressed_cb (GtkGesture *gesture,
       gtk_container_add (GTK_CONTAINER (menu), box);
 
       item = gtk_button_new_with_label ("New Label");
-      gtk_button_set_relief (GTK_BUTTON (item), GTK_RELIEF_NONE);
+      gtk_button_set_has_frame (GTK_BUTTON (item), FALSE);
       g_signal_connect (item, "clicked", G_CALLBACK (new_label_cb), widget);
       gtk_container_add (GTK_CONTAINER (box), item);
       item = gtk_button_new_with_label ("New Spinner");
-      gtk_button_set_relief (GTK_BUTTON (item), GTK_RELIEF_NONE);
+      gtk_button_set_has_frame (GTK_BUTTON (item), FALSE);
       g_signal_connect (item, "clicked", G_CALLBACK (new_spinner_cb), widget);
       gtk_container_add (GTK_CONTAINER (box), item);
 
@@ -291,7 +291,7 @@ pressed_cb (GtkGesture *gesture,
       gtk_container_add (GTK_CONTAINER (box), item);
 
       item = gtk_button_new_with_label ("Edit");
-      gtk_button_set_relief (GTK_BUTTON (item), GTK_RELIEF_NONE);
+      gtk_button_set_has_frame (GTK_BUTTON (item), FALSE);
       gtk_widget_set_sensitive (item, child != NULL && child != widget);
       g_signal_connect (item, "clicked", G_CALLBACK (edit_cb), child);
       gtk_container_add (GTK_CONTAINER (box), item);
@@ -300,24 +300,24 @@ pressed_cb (GtkGesture *gesture,
       gtk_container_add (GTK_CONTAINER (box), item);
 
       item = gtk_button_new_with_label ("Cut");
-      gtk_button_set_relief (GTK_BUTTON (item), GTK_RELIEF_NONE);
+      gtk_button_set_has_frame (GTK_BUTTON (item), FALSE);
       gtk_widget_set_sensitive (item, child != NULL && child != widget);
       g_signal_connect (item, "clicked", G_CALLBACK (cut_cb), child);
       gtk_container_add (GTK_CONTAINER (box), item);
       item = gtk_button_new_with_label ("Copy");
-      gtk_button_set_relief (GTK_BUTTON (item), GTK_RELIEF_NONE);
+      gtk_button_set_has_frame (GTK_BUTTON (item), FALSE);
       gtk_widget_set_sensitive (item, child != NULL && child != widget);
       g_signal_connect (item, "clicked", G_CALLBACK (copy_cb), child);
       gtk_container_add (GTK_CONTAINER (box), item);
       item = gtk_button_new_with_label ("Paste");
-      gtk_button_set_relief (GTK_BUTTON (item), GTK_RELIEF_NONE);
+      gtk_button_set_has_frame (GTK_BUTTON (item), FALSE);
       clipboard = gdk_display_get_clipboard (gdk_display_get_default ());
       gtk_widget_set_sensitive (item,
                                 gdk_content_formats_contain_gtype (gdk_clipboard_get_formats (clipboard), 
GTK_TYPE_DEMO_WIDGET));
       g_signal_connect (item, "clicked", G_CALLBACK (paste_cb), widget);
       gtk_container_add (GTK_CONTAINER (box), item);
       item = gtk_button_new_with_label ("Delete");
-      gtk_button_set_relief (GTK_BUTTON (item), GTK_RELIEF_NONE);
+      gtk_button_set_has_frame (GTK_BUTTON (item), FALSE);
       gtk_widget_set_sensitive (item, child != NULL && child != widget);
       g_signal_connect (item, "clicked", G_CALLBACK (delete_cb), child);
       gtk_container_add (GTK_CONTAINER (box), item);
diff --git a/demos/gtk-demo/fishbowl.ui b/demos/gtk-demo/fishbowl.ui
index df065d48a4..3805724437 100644
--- a/demos/gtk-demo/fishbowl.ui
+++ b/demos/gtk-demo/fishbowl.ui
@@ -49,7 +49,7 @@
         <child type="end">
           <object class="GtkToggleButton" id="changes_allow">
             <property name="icon-name">changes-allow</property>
-            <property name="relief">none</property>
+            <property name="has-frame">0</property>
             <signal name="notify::active" handler="fishbowl_changes_toggled_cb"/>
           </object>
         </child>
diff --git a/demos/gtk-demo/listbox.ui b/demos/gtk-demo/listbox.ui
index 8588bf79e6..c43ec2321a 100644
--- a/demos/gtk-demo/listbox.ui
+++ b/demos/gtk-demo/listbox.ui
@@ -40,7 +40,7 @@
               <object class="GtkButton" id="button2">
                 <property name="receives-default">1</property>
                 <property name="valign">baseline</property>
-                <property name="relief">none</property>
+                <property name="has-frame">0</property>
                 <child>
                   <object class="GtkLabel" id="source_name">
                     <property name="valign">baseline</property>
@@ -109,7 +109,7 @@
               <object class="GtkLinkButton" id="resent_by_button">
                 <property name="label" translatable="0">reshareer</property>
                 <property name="receives-default">1</property>
-                <property name="relief">none</property>
+                <property name="has-frame">0</property>
                 <property name="uri">http://www.gtk.org</property>
               </object>
             </child>
@@ -126,7 +126,7 @@
               <object class="GtkButton" id="expand_button">
                 <property name="label" translatable="yes">Expand</property>
                 <property name="receives-default">1</property>
-                <property name="relief">none</property>
+                <property name="has-frame">0</property>
                 <signal name="clicked" handler="expand_clicked" swapped="yes"/>
               </object>
             </child>
@@ -138,14 +138,14 @@
                   <object class="GtkButton" id="reply-button">
                     <property name="label" translatable="yes">Reply</property>
                     <property name="receives-default">1</property>
-                    <property name="relief">none</property>
+                    <property name="has-frame">0</property>
                   </object>
                 </child>
                 <child>
                   <object class="GtkButton" id="reshare-button">
                     <property name="label" translatable="yes">Reshare</property>
                     <property name="receives-default">1</property>
-                    <property name="relief">none</property>
+                    <property name="has-frame">0</property>
                     <signal name="clicked" handler="reshare_clicked" swapped="yes"/>
                   </object>
                 </child>
@@ -153,7 +153,7 @@
                   <object class="GtkButton" id="favorite-buttton">
                     <property name="label" translatable="yes">Favorite</property>
                     <property name="receives-default">1</property>
-                    <property name="relief">none</property>
+                    <property name="has-frame">0</property>
                     <signal name="clicked" handler="favorite_clicked" swapped="yes"/>
                   </object>
                 </child>
@@ -223,7 +223,7 @@ FAVORITES</property>
                       <object class="GtkButton" id="button5">
                         <property name="label" translatable="yes">Details</property>
                         <property name="receives-default">1</property>
-                        <property name="relief">none</property>
+                        <property name="has-frame">0</property>
                         <style>
                           <class name="dim-label"/>
                         </style>
diff --git a/demos/widget-factory/widget-factory.ui b/demos/widget-factory/widget-factory.ui
index e7c30454e3..ff76f86d27 100644
--- a/demos/widget-factory/widget-factory.ui
+++ b/demos/widget-factory/widget-factory.ui
@@ -864,7 +864,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
                                 <property name="label" translatable="yes">link button</property>
                                 <property name="receives-default">1</property>
                                 <property name="has-tooltip">1</property>
-                                <property name="relief">none</property>
+                                <property name="has-frame">0</property>
                                 <property name="uri">http://www.gtk.org</property>
                               </object>
                             </child>
@@ -1449,7 +1449,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
                                 <child>
                                   <object class="GtkButton" id="page2dismiss">
                                     <property name="focus-on-click">0</property>
-                                    <property name="relief">none</property>
+                                    <property name="has-frame">0</property>
                                     <property name="icon-name">window-close-symbolic</property>
                                   </object>
                                 </child>
@@ -2664,7 +2664,7 @@ microphone-sensitivity-medium-symbolic</property>
                                                 </child>
                                                 <child>
                                                   <object class="GtkButton">
-                                                    <property name="relief">none</property>
+                                                    <property name="has-frame">0</property>
                                                     <property name="focus-on-click">0</property>
                                                     <property 
name="icon-name">window-close-symbolic</property>
                                                     <signal name="clicked" handler="tab_close_cb" 
object="closable_page_1"/>
@@ -2696,7 +2696,7 @@ microphone-sensitivity-medium-symbolic</property>
                                                 </child>
                                                 <child>
                                                   <object class="GtkButton">
-                                                    <property name="relief">none</property>
+                                                    <property name="has-frame">0</property>
                                                     <property name="focus-on-click">0</property>
                                                     <property 
name="icon-name">window-close-symbolic</property>
                                                     <signal name="clicked" handler="tab_close_cb" 
object="closable_page_2"/>
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index a5ff7e1261..0b32fd1d4a 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -520,8 +520,8 @@ gtk_button_new
 gtk_button_new_with_label
 gtk_button_new_with_mnemonic
 gtk_button_new_from_icon_name
-gtk_button_set_relief
-gtk_button_get_relief
+gtk_button_set_has_frame
+gtk_button_get_has_frame
 gtk_button_get_label
 gtk_button_set_label
 gtk_button_get_use_underline
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 6ad1fb6304..b1be03fa9f 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -102,7 +102,7 @@ enum {
 enum {
   PROP_0,
   PROP_LABEL,
-  PROP_RELIEF,
+  PROP_HAS_FRAME,
   PROP_USE_UNDERLINE,
   PROP_ICON_NAME,
 
@@ -228,13 +228,12 @@ gtk_button_class_init (GtkButtonClass *klass)
                           FALSE,
                           GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
 
-  props[PROP_RELIEF] =
-    g_param_spec_enum ("relief",
-                       P_("Border relief"),
-                       P_("The border relief style"),
-                       GTK_TYPE_RELIEF_STYLE,
-                       GTK_RELIEF_NORMAL,
-                       GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
+  props[PROP_HAS_FRAME] =
+    g_param_spec_boolean ("has-frame",
+                          P_("Has Frame"),
+                          P_("Whether the button has a frame"),
+                          TRUE,
+                          GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
 
   props[PROP_ICON_NAME] =
     g_param_spec_string ("icon-name",
@@ -484,8 +483,8 @@ gtk_button_set_property (GObject         *object,
     case PROP_LABEL:
       gtk_button_set_label (button, g_value_get_string (value));
       break;
-    case PROP_RELIEF:
-      gtk_button_set_relief (button, g_value_get_enum (value));
+    case PROP_HAS_FRAME:
+      gtk_button_set_has_frame (button, g_value_get_boolean (value));
       break;
     case PROP_USE_UNDERLINE:
       gtk_button_set_use_underline (button, g_value_get_boolean (value));
@@ -519,8 +518,8 @@ gtk_button_get_property (GObject         *object,
     case PROP_LABEL:
       g_value_set_string (value, gtk_button_get_label (button));
       break;
-    case PROP_RELIEF:
-      g_value_set_enum (value, gtk_button_get_relief (button));
+    case PROP_HAS_FRAME:
+      g_value_set_boolean (value, gtk_button_get_has_frame (button));
       break;
     case PROP_USE_UNDERLINE:
       g_value_set_boolean (value, priv->use_underline);
@@ -641,51 +640,45 @@ gtk_button_new_with_mnemonic (const gchar *label)
 }
 
 /**
- * gtk_button_set_relief:
- * @button: The #GtkButton you want to set relief styles of
- * @relief: The GtkReliefStyle as described above
+ * gtk_Button_set_has_frame:
+ * @button: a #GtkButton
+ * @has_frame: whether the button should have a visible frame
  *
- * Sets the relief style of the edges of the given #GtkButton widget.
- * Two styles exist, %GTK_RELIEF_NORMAL and %GTK_RELIEF_NONE.
- * The default style is, as one can guess, %GTK_RELIEF_NORMAL.
+ * Sets the style of the button. Buttons can has a flat appearance
+ * or have a frame drawn around them.
  */
 void
-gtk_button_set_relief (GtkButton      *button,
-                       GtkReliefStyle  relief)
+gtk_button_set_has_frame (GtkButton *button,
+                          gboolean   has_frame)
 {
-  GtkReliefStyle old_relief;
 
   g_return_if_fail (GTK_IS_BUTTON (button));
 
-  old_relief = gtk_button_get_relief (button);
-  if (old_relief != relief)
-    {
-      if (relief == GTK_RELIEF_NONE)
-        gtk_widget_add_css_class (GTK_WIDGET (button), GTK_STYLE_CLASS_FLAT);
-      else
-        gtk_widget_remove_css_class (GTK_WIDGET (button), GTK_STYLE_CLASS_FLAT);
+  if (gtk_button_get_has_frame (button) == has_frame)
+    return;
 
-      g_object_notify_by_pspec (G_OBJECT (button), props[PROP_RELIEF]);
-    }
+  if (has_frame)
+    gtk_widget_remove_css_class (GTK_WIDGET (button), GTK_STYLE_CLASS_FLAT);
+  else
+    gtk_widget_add_css_class (GTK_WIDGET (button), GTK_STYLE_CLASS_FLAT);
+
+  g_object_notify_by_pspec (G_OBJECT (button), props[PROP_HAS_FRAME]);
 }
 
 /**
- * gtk_button_get_relief:
- * @button: The #GtkButton you want the #GtkReliefStyle from.
+ * gtk_button_get_has_frame:
+ * @button: a #GtkButton
  *
- * Returns the current relief style of the given #GtkButton.
+ * Returns whether the button has a frame.
  *
- * Returns: The current #GtkReliefStyle
+ * Returns: %TRUE if the button has a frame
  */
-GtkReliefStyle
-gtk_button_get_relief (GtkButton *button)
+gboolean
+gtk_button_get_has_frame (GtkButton *button)
 {
-  g_return_val_if_fail (GTK_IS_BUTTON (button), GTK_RELIEF_NORMAL);
+  g_return_val_if_fail (GTK_IS_BUTTON (button), TRUE);
 
-  if (gtk_widget_has_css_class (GTK_WIDGET (button), GTK_STYLE_CLASS_FLAT))
-    return GTK_RELIEF_NONE;
-  else
-    return GTK_RELIEF_NORMAL;
+  return !gtk_widget_has_css_class (GTK_WIDGET (button), GTK_STYLE_CLASS_FLAT);
 }
 
 static void
diff --git a/gtk/gtkbutton.h b/gtk/gtkbutton.h
index f3738f9166..9a4b15c992 100644
--- a/gtk/gtkbutton.h
+++ b/gtk/gtkbutton.h
@@ -86,10 +86,10 @@ GDK_AVAILABLE_IN_ALL
 GtkWidget*     gtk_button_new_with_mnemonic (const gchar    *label);
 
 GDK_AVAILABLE_IN_ALL
-void                  gtk_button_set_relief         (GtkButton      *button,
-                                                    GtkReliefStyle  relief);
+void                  gtk_button_set_has_frame      (GtkButton      *button,
+                                                    gboolean        has_frame);
 GDK_AVAILABLE_IN_ALL
-GtkReliefStyle        gtk_button_get_relief         (GtkButton      *button);
+gboolean              gtk_button_get_has_frame      (GtkButton      *button);
 GDK_AVAILABLE_IN_ALL
 void                  gtk_button_set_label          (GtkButton      *button,
                                                     const gchar    *label);
diff --git a/gtk/gtklinkbutton.c b/gtk/gtklinkbutton.c
index ee82086798..a260f146cf 100644
--- a/gtk/gtklinkbutton.c
+++ b/gtk/gtklinkbutton.c
@@ -345,7 +345,7 @@ gtk_link_button_init (GtkLinkButton *link_button)
   GdkContentProvider *content;
   GtkDragSource *source;
 
-  gtk_button_set_relief (GTK_BUTTON (link_button), GTK_RELIEF_NONE);
+  gtk_button_set_has_frame (GTK_BUTTON (link_button), FALSE);
   gtk_widget_set_state_flags (GTK_WIDGET (link_button), GTK_STATE_FLAG_LINK, FALSE);
   gtk_widget_set_has_tooltip (GTK_WIDGET (link_button), TRUE);
 
diff --git a/gtk/gtkmenubutton.c b/gtk/gtkmenubutton.c
index c210d096d0..3e9f78ca4a 100644
--- a/gtk/gtkmenubutton.c
+++ b/gtk/gtkmenubutton.c
@@ -946,12 +946,15 @@ void
 gtk_menu_button_set_relief (GtkMenuButton  *menu_button,
                             GtkReliefStyle  relief)
 {
+  gboolean has_frame;
+
   g_return_if_fail (GTK_IS_MENU_BUTTON (menu_button));
 
-  if (relief == gtk_button_get_relief (GTK_BUTTON (menu_button->button)))
+  has_frame = relief == GTK_RELIEF_NORMAL;
+  if (gtk_button_get_has_frame (GTK_BUTTON (menu_button->button)) == has_frame)
     return;
 
-  gtk_button_set_relief (GTK_BUTTON (menu_button->button), relief);
+  gtk_button_set_has_frame (GTK_BUTTON (menu_button->button), has_frame);
   g_object_notify_by_pspec (G_OBJECT (menu_button), menu_button_props[PROP_RELIEF]);
 }
 
@@ -968,7 +971,8 @@ gtk_menu_button_get_relief (GtkMenuButton *menu_button)
 {
   g_return_val_if_fail (GTK_IS_MENU_BUTTON (menu_button), GTK_RELIEF_NORMAL);
 
-  return gtk_button_get_relief (GTK_BUTTON (menu_button->button));
+  return gtk_button_get_has_frame (GTK_BUTTON (menu_button->button))
+         ? GTK_RELIEF_NORMAL : GTK_RELIEF_NONE;
 }
 
 /**
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 277138fe32..1faaf5f8ea 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -5545,7 +5545,7 @@ gtk_notebook_menu_item_create (GtkNotebook *notebook,
     }
 
   menu_item = gtk_button_new ();
-  gtk_button_set_relief (GTK_BUTTON (menu_item), GTK_RELIEF_NONE);
+  gtk_button_set_has_frame (GTK_BUTTON (menu_item), FALSE);
   gtk_container_add (GTK_CONTAINER (menu_item), page->menu_label);
   gtk_container_add (GTK_CONTAINER (notebook->menu_box), menu_item);
   g_signal_connect (menu_item, "clicked",
diff --git a/gtk/gtkplacesview.c b/gtk/gtkplacesview.c
index 415358486f..4a66513b03 100644
--- a/gtk/gtkplacesview.c
+++ b/gtk/gtkplacesview.c
@@ -610,7 +610,7 @@ populate_servers (GtkPlacesView *view)
       button = gtk_button_new_from_icon_name ("window-close-symbolic");
       gtk_widget_set_halign (button, GTK_ALIGN_END);
       gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
-      gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
+      gtk_button_set_has_frame (GTK_BUTTON (button), FALSE);
       gtk_widget_add_css_class (button, "sidebar-button");
       gtk_grid_attach (GTK_GRID (grid), button, 1, 0, 1, 2);
 
diff --git a/gtk/inspector/css-editor.ui b/gtk/inspector/css-editor.ui
index 50b9bee503..dc4649904c 100644
--- a/gtk/inspector/css-editor.ui
+++ b/gtk/inspector/css-editor.ui
@@ -29,7 +29,7 @@
         <property name="margin-bottom">6</property>
         <child>
           <object class="GtkToggleButton" id="disable_button">
-            <property name="relief">none</property>
+            <property name="has-frame">0</property>
             <property name="tooltip-text" translatable="yes">Disable this custom CSS</property>
             <property name="icon-name">media-playback-pause-symbolic</property>
             <signal name="toggled" handler="disable_toggled"/>
@@ -37,7 +37,7 @@
         </child>
         <child>
           <object class="GtkButton" id="save_button">
-            <property name="relief">none</property>
+            <property name="has-frame">0</property>
             <property name="tooltip-text" translatable="yes">Save the current CSS</property>
             <property name="icon-name">document-save-symbolic</property>
             <signal name="clicked" handler="save_clicked"/>
diff --git a/gtk/inspector/data-list.ui b/gtk/inspector/data-list.ui
index 19549a9834..78e2369777 100644
--- a/gtk/inspector/data-list.ui
+++ b/gtk/inspector/data-list.ui
@@ -10,7 +10,7 @@
         <property name="margin-bottom">6</property>
         <child>
           <object class="GtkToggleButton" id="show_button">
-            <property name="relief">none</property>
+            <property name="has-frame">0</property>
             <property name="tooltip-text" translatable="yes">Show data</property>
             <property name="icon-name">view-refresh-symbolic</property>
             <signal name="toggled" handler="toggle_show"/>
diff --git a/gtk/inspector/object-tree.c b/gtk/inspector/object-tree.c
index a1a8760f4d..bc720a4b19 100644
--- a/gtk/inspector/object-tree.c
+++ b/gtk/inspector/object-tree.c
@@ -1020,7 +1020,7 @@ gtk_inspector_object_tree_create_list_widget (gpointer row_item,
       child = g_object_new (GTK_TYPE_BOX, "css-name", "expander", NULL);
 
       title = g_object_new (GTK_TYPE_TOGGLE_BUTTON, "css-name", "title", NULL);
-      gtk_button_set_relief (GTK_BUTTON (title), GTK_RELIEF_NONE);
+      gtk_button_set_has_frame (GTK_BUTTON (title), FALSE);
       g_object_bind_property (row_item, "expanded", title, "active", G_BINDING_BIDIRECTIONAL | 
G_BINDING_SYNC_CREATE);
       gtk_container_add (GTK_CONTAINER (child), title);
 
diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c
index b4ed3d965e..ac7f728f7f 100644
--- a/gtk/inspector/recorder.c
+++ b/gtk/inspector/recorder.c
@@ -324,7 +324,7 @@ create_widget_for_render_node (gpointer row_item,
       child = g_object_new (GTK_TYPE_BOX, "css-name", "expander", NULL);
 
       title = g_object_new (GTK_TYPE_TOGGLE_BUTTON, "css-name", "title", NULL);
-      gtk_button_set_relief (GTK_BUTTON (title), GTK_RELIEF_NONE);
+      gtk_button_set_has_frame (GTK_BUTTON (title), FALSE);
       g_object_bind_property (row_item, "expanded", title, "active", G_BINDING_BIDIRECTIONAL | 
G_BINDING_SYNC_CREATE);
       gtk_container_add (GTK_CONTAINER (child), title);
       g_object_set_data_full (G_OBJECT (row), "make-sure-its-not-unreffed", g_object_ref (row_item), 
g_object_unref);
@@ -1117,7 +1117,7 @@ gtk_inspector_recorder_recordings_list_create_widget (gpointer item,
       gtk_container_add (GTK_CONTAINER (hbox), label);
 
       button = gtk_toggle_button_new ();
-      gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
+      gtk_button_set_has_frame (GTK_BUTTON (button), FALSE);
       gtk_button_set_icon_name (GTK_BUTTON (button), "view-more-symbolic");
 
       gtk_container_add (GTK_CONTAINER (hbox), button);
diff --git a/gtk/inspector/recorder.ui b/gtk/inspector/recorder.ui
index 54fed8871e..c3e6d2071e 100644
--- a/gtk/inspector/recorder.ui
+++ b/gtk/inspector/recorder.ui
@@ -13,7 +13,7 @@
             <property name="margin-bottom">6</property>
             <child>
               <object class="GtkToggleButton">
-                <property name="relief">none</property>
+                <property name="has-frame">0</property>
                 <property name="icon-name">media-record-symbolic</property>
                 <property name="tooltip-text" translatable="yes">Record frames</property>
                 <property name="active" bind-source="GtkInspectorRecorder" bind-property="recording" 
bind-flags="bidirectional|sync-create"/>
@@ -21,7 +21,7 @@
             </child>
             <child>
               <object class="GtkButton">
-                <property name="relief">none</property>
+                <property name="has-frame">0</property>
                 <property name="icon-name">edit-clear-all-symbolic</property>
                 <property name="tooltip-text" translatable="yes">Clear recorded frames</property>
                 <signal name="clicked" handler="recordings_clear_all"/>
@@ -29,7 +29,7 @@
             </child>
             <child>
               <object class="GtkToggleButton">
-                <property name="relief">none</property>
+                <property name="has-frame">0</property>
                 <property name="icon-name">insert-object-symbolic</property>
                 <property name="tooltip-text" translatable="yes">Add debug nodes</property>
                 <property name="active" bind-source="GtkInspectorRecorder" bind-property="debug-nodes" 
bind-flags="bidirectional|sync-create"/>
@@ -39,7 +39,7 @@
             </child>
             <child>
               <object class="GtkButton" id="render_node_save_button">
-                <property name="relief">none</property>
+                <property name="has-frame">0</property>
                 <property name="sensitive">0</property>
                 <property name="icon-name">document-save-as-symbolic</property>
                 <property name="tooltip-text" translatable="yes">Save selected node</property>
diff --git a/gtk/inspector/window.ui b/gtk/inspector/window.ui
index 4623a72229..4fc07bcfc8 100644
--- a/gtk/inspector/window.ui
+++ b/gtk/inspector/window.ui
@@ -230,7 +230,7 @@
                                       <object class="GtkButton">
                                         <property name="icon-name">go-previous-symbolic</property>
                                         <property name="tooltip-text" translatable="yes">Toggle 
Sidebar</property>
-                                        <property name="relief">none</property>
+                                        <property name="has-frame">0</property>
                                         <property name="margin-start">6</property>
                                         <property name="margin-end">6</property>
                                         <property name="margin-top">6</property>
@@ -262,7 +262,7 @@
                                                 <property name="margin-bottom">6</property>
                                                 <property name="icon-name">view-refresh-symbolic</property>
                                                 <property name="tooltip-text" translatable="yes">Refresh 
action state</property>
-                                                <property name="relief">none</property>
+                                                <property name="has-frame">0</property>
                                               </object>
                                             </property>
                                           </object>
diff --git a/gtk/ui/gtkemojichooser.ui b/gtk/ui/gtkemojichooser.ui
index ad7ad0191b..388761ca0d 100644
--- a/gtk/ui/gtkemojichooser.ui
+++ b/gtk/ui/gtkemojichooser.ui
@@ -215,7 +215,7 @@
                         </style>
                         <child>
                           <object class="GtkButton" id="recent.button">
-                            <property name="relief">none</property>
+                            <property name="has-frame">0</property>
                             <property name="tooltip-text" translatable="yes" context="emoji 
category">Recent</property>
                             <style>
                               <class name="emoji-section"/>
@@ -224,7 +224,7 @@
                         </child>
                         <child>
                           <object class="GtkButton" id="people.button">
-                            <property name="relief">none</property>
+                            <property name="has-frame">0</property>
                             <property name="tooltip-text" translatable="yes" context="emoji 
category">Smileys &amp; People</property>
                             <style>
                               <class name="emoji-section"/>
@@ -233,7 +233,7 @@
                         </child>
                         <child>
                           <object class="GtkButton" id="body.button">
-                            <property name="relief">none</property>
+                            <property name="has-frame">0</property>
                             <property name="tooltip-text" translatable="yes" context="emoji category">Body 
&amp; Clothing</property>
                             <style>
                               <class name="emoji-section"/>
@@ -242,7 +242,7 @@
                         </child>
                         <child>
                           <object class="GtkButton" id="nature.button">
-                            <property name="relief">none</property>
+                            <property name="has-frame">0</property>
                             <property name="tooltip-text" translatable="yes" context="emoji 
category">Animals &amp; Nature</property>
                             <style>
                               <class name="emoji-section"/>
@@ -251,7 +251,7 @@
                         </child>
                         <child>
                           <object class="GtkButton" id="food.button">
-                            <property name="relief">none</property>
+                            <property name="has-frame">0</property>
                             <property name="tooltip-text" translatable="yes" context="emoji category">Food 
&amp; Drink</property>
                             <style>
                               <class name="emoji-section"/>
@@ -260,7 +260,7 @@
                         </child>
                         <child>
                           <object class="GtkButton" id="travel.button">
-                            <property name="relief">none</property>
+                            <property name="has-frame">0</property>
                             <property name="tooltip-text" translatable="yes" context="emoji category">Travel 
&amp; Places</property>
                             <style>
                               <class name="emoji-section"/>
@@ -269,7 +269,7 @@
                         </child>
                         <child>
                           <object class="GtkButton" id="activities.button">
-                            <property name="relief">none</property>
+                            <property name="has-frame">0</property>
                             <property name="tooltip-text" translatable="yes" context="emoji 
category">Activities</property>
                             <style>
                               <class name="emoji-section"/>
@@ -278,7 +278,7 @@
                         </child>
                         <child>
                           <object class="GtkButton" id="objects.button">
-                            <property name="relief">none</property>
+                            <property name="has-frame">0</property>
                             <property name="tooltip-text" translatable="yes" context="emoji 
category">Objects</property>
                             <style>
                               <class name="emoji-section"/>
@@ -287,7 +287,7 @@
                         </child>
                         <child>
                           <object class="GtkButton" id="symbols.button">
-                            <property name="relief">none</property>
+                            <property name="has-frame">0</property>
                             <property name="tooltip-text" translatable="yes" context="emoji 
category">Symbols</property>
                             <style>
                               <class name="emoji-section"/>
@@ -296,7 +296,7 @@
                         </child>
                         <child>
                           <object class="GtkButton" id="flags.button">
-                            <property name="relief">none</property>
+                            <property name="has-frame">0</property>
                             <property name="tooltip-text" translatable="yes" context="emoji 
category">Flags</property>
                             <style>
                               <class name="emoji-section"/>
diff --git a/gtk/ui/gtkscalebutton.ui b/gtk/ui/gtkscalebutton.ui
index f7611fa481..f95045e62d 100644
--- a/gtk/ui/gtkscalebutton.ui
+++ b/gtk/ui/gtkscalebutton.ui
@@ -6,7 +6,7 @@
         <property name="receives-default">1</property>
         <property name="focus-on-click">0</property>
         <property name="icon-name">image-missing</property>
-        <property name="relief">none</property>
+        <property name="has-frame">0</property>
       </object>
     </child>
   </template>
@@ -26,7 +26,7 @@
         <child>
           <object class="GtkButton" id="plus_button">
             <property name="receives-default">1</property>
-            <property name="relief">none</property>
+            <property name="has-frame">0</property>
             <property name="halign">center</property>
             <property name="valign">center</property>
             <property name="icon-name">list-add-symbolic</property>
@@ -46,7 +46,7 @@
         <child>
           <object class="GtkButton" id="minus_button">
             <property name="receives-default">1</property>
-            <property name="relief">none</property>
+            <property name="has-frame">0</property>
             <property name="halign">center</property>
             <property name="valign">center</property>
             <property name="icon-name">list-remove-symbolic</property>
diff --git a/tests/testtreelistmodel.c b/tests/testtreelistmodel.c
index 4b2dbb7f9e..06d956a139 100644
--- a/tests/testtreelistmodel.c
+++ b/tests/testtreelistmodel.c
@@ -192,7 +192,7 @@ create_widget_for_model (gpointer item,
       child = g_object_new (GTK_TYPE_BOX, "css-name", "expander", NULL);
       
       title = g_object_new (GTK_TYPE_TOGGLE_BUTTON, "css-name", "title", NULL);
-      gtk_button_set_relief (GTK_BUTTON (title), GTK_RELIEF_NONE);
+      gtk_button_set_has_frame (GTK_BUTTON (title), FALSE);
       g_object_bind_property (item, "expanded", title, "active", G_BINDING_BIDIRECTIONAL | 
G_BINDING_SYNC_CREATE);
       g_object_set_data_full (G_OBJECT (title), "make-sure-its-not-unreffed", g_object_ref (item), 
g_object_unref);
       gtk_container_add (GTK_CONTAINER (child), title);
diff --git a/testsuite/gtk/focus-chain/widget-factory.ui b/testsuite/gtk/focus-chain/widget-factory.ui
index f7e2b62e61..c25cf9e665 100644
--- a/testsuite/gtk/focus-chain/widget-factory.ui
+++ b/testsuite/gtk/focus-chain/widget-factory.ui
@@ -866,7 +866,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
                                 <property name="label" translatable="yes">link button</property>
                                 <property name="receives-default">1</property>
                                 <property name="has-tooltip">1</property>
-                                <property name="relief">none</property>
+                                <property name="has-frame">0</property>
                                 <property name="uri">http://www.gtk.org</property>
                               </object>
                             </child>
@@ -1451,7 +1451,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
                                 <child>
                                   <object class="GtkButton" id="page2dismiss">
                                     <property name="focus-on-click">0</property>
-                                    <property name="relief">none</property>
+                                    <property name="has-frame">0</property>
                                     <property name="icon-name">window-close-symbolic</property>
                                   </object>
                                 </child>
@@ -2658,7 +2658,7 @@ microphone-sensitivity-medium-symbolic</property>
                                                 </child>
                                                 <child>
                                                   <object class="GtkButton">
-                                                    <property name="relief">none</property>
+                                                    <property name="has-frame">0</property>
                                                     <property name="focus-on-click">0</property>
                                                     <property 
name="icon-name">window-close-symbolic</property>
                                                     <style>
@@ -2689,7 +2689,7 @@ microphone-sensitivity-medium-symbolic</property>
                                                 </child>
                                                 <child>
                                                   <object class="GtkButton">
-                                                    <property name="relief">none</property>
+                                                    <property name="has-frame">0</property>
                                                     <property name="focus-on-click">0</property>
                                                     <property 
name="icon-name">window-close-symbolic</property>
                                                     <style>
diff --git a/testsuite/gtk/focus-chain/widget-factory2.ui b/testsuite/gtk/focus-chain/widget-factory2.ui
index ef17534acf..1cd62fb7f2 100644
--- a/testsuite/gtk/focus-chain/widget-factory2.ui
+++ b/testsuite/gtk/focus-chain/widget-factory2.ui
@@ -1452,7 +1452,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
                                 <child>
                                   <object class="GtkButton" id="page2dismiss">
                                     <property name="focus-on-click">0</property>
-                                    <property name="relief">none</property>
+                                    <property name="has-frame">0</property>
                                     <property name="icon-name">window-close-symbolic</property>
                                   </object>
                                 </child>
@@ -2659,7 +2659,7 @@ microphone-sensitivity-medium-symbolic</property>
                                                 </child>
                                                 <child>
                                                   <object class="GtkButton">
-                                                    <property name="relief">none</property>
+                                                    <property name="has-frame">0</property>
                                                     <property name="focus-on-click">0</property>
                                                     <property 
name="icon-name">window-close-symbolic</property>
                                                     <style>
@@ -2690,7 +2690,7 @@ microphone-sensitivity-medium-symbolic</property>
                                                 </child>
                                                 <child>
                                                   <object class="GtkButton">
-                                                    <property name="relief">none</property>
+                                                    <property name="has-frame">0</property>
                                                     <property name="focus-on-click">0</property>
                                                     <property 
name="icon-name">window-close-symbolic</property>
                                                     <style>
diff --git a/testsuite/gtk/focus-chain/widget-factory3.ui b/testsuite/gtk/focus-chain/widget-factory3.ui
index 694dd377e7..d5d557581e 100644
--- a/testsuite/gtk/focus-chain/widget-factory3.ui
+++ b/testsuite/gtk/focus-chain/widget-factory3.ui
@@ -867,7 +867,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
                                 <property name="label" translatable="yes">link button</property>
                                 <property name="receives-default">1</property>
                                 <property name="has-tooltip">1</property>
-                                <property name="relief">none</property>
+                                <property name="has-frame">0</property>
                                 <property name="uri">http://www.gtk.org</property>
                               </object>
                             </child>
@@ -1452,7 +1452,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
                                 <child>
                                   <object class="GtkButton" id="page2dismiss">
                                     <property name="focus-on-click">0</property>
-                                    <property name="relief">none</property>
+                                    <property name="has-frame">0</property>
                                     <property name="icon-name">window-close-symbolic</property>
                                   </object>
                                 </child>
@@ -2659,7 +2659,7 @@ microphone-sensitivity-medium-symbolic</property>
                                                 </child>
                                                 <child>
                                                   <object class="GtkButton">
-                                                    <property name="relief">none</property>
+                                                    <property name="has-frame">0</property>
                                                     <property name="focus-on-click">0</property>
                                                     <property 
name="icon-name">window-close-symbolic</property>
                                                     <style>
@@ -2690,7 +2690,7 @@ microphone-sensitivity-medium-symbolic</property>
                                                 </child>
                                                 <child>
                                                   <object class="GtkButton">
-                                                    <property name="relief">none</property>
+                                                    <property name="has-frame">0</property>
                                                     <property name="focus-on-click">0</property>
                                                     <property 
name="icon-name">window-close-symbolic</property>
                                                     <style>
diff --git a/testsuite/reftests/link-coloring.ui b/testsuite/reftests/link-coloring.ui
index 8fc5ac143f..8c8bc69755 100644
--- a/testsuite/reftests/link-coloring.ui
+++ b/testsuite/reftests/link-coloring.ui
@@ -15,7 +15,7 @@
           <object class="GtkLinkButton" id="linkbutton1">
             <property name="label" translatable="yes">A normal link</property>
             <property name="receives_default">1</property>
-            <property name="relief">none</property>
+            <property name="has-frame">0</property>
             <property name="uri">http://gnome.org</property>
           </object>
         </child>
@@ -23,7 +23,7 @@
           <object class="GtkLinkButton" id="linkbutton2">
             <property name="label" translatable="yes">A visited link</property>
             <property name="receives_default">1</property>
-            <property name="relief">none</property>
+            <property name="has-frame">0</property>
             <property name="uri">http://gnome.org</property>
             <property name="visited">1</property>
           </object>



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