[epiphany/wip/exalm/gtk4-cleanups-3: 11/18] Stop using GtkButton:relief
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/exalm/gtk4-cleanups-3: 11/18] Stop using GtkButton:relief
- Date: Wed, 1 Dec 2021 23:40:05 +0000 (UTC)
commit 28646b9a6e1e1a15b353436c8a5afe43cd9efc13
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Thu Dec 2 03:38:43 2021 +0500
Stop using GtkButton:relief
This will go away in GTK4, use .flat style class instead.
lib/ephy-notification.c | 2 +-
src/bookmarks/ephy-bookmark-properties.c | 2 +-
src/ephy-history-dialog.c | 1 -
src/resources/gtk/bookmark-row.ui | 4 +++-
src/resources/gtk/page-row.ui | 1 -
5 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/lib/ephy-notification.c b/lib/ephy-notification.c
index c7f732b05..6f017326c 100644
--- a/lib/ephy-notification.c
+++ b/lib/ephy-notification.c
@@ -147,10 +147,10 @@ ephy_notification_init (EphyNotification *self)
self->close_button = gtk_button_new ();
g_object_set (self->close_button,
- "relief", GTK_RELIEF_NONE,
"focus-on-click", FALSE,
"margin", 6,
NULL);
+ gtk_style_context_add_class (gtk_widget_get_style_context (self->close_button), "flat");
gtk_grid_attach (GTK_GRID (self->grid), self->close_button, 1, 0, 1, 2);
image = gtk_image_new_from_icon_name ("window-close-symbolic", GTK_ICON_SIZE_BUTTON);
diff --git a/src/bookmarks/ephy-bookmark-properties.c b/src/bookmarks/ephy-bookmark-properties.c
index da1f4c6a0..67c7dd3bb 100644
--- a/src/bookmarks/ephy-bookmark-properties.c
+++ b/src/bookmarks/ephy-bookmark-properties.c
@@ -200,7 +200,7 @@ ephy_bookmark_properties_create_tag_widget (EphyBookmarkProperties *self,
gtk_image_new_from_icon_name ("window-close-symbolic",
GTK_ICON_SIZE_MENU));
gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
- gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
+ gtk_style_context_add_class (gtk_widget_get_style_context (button), "flat");
gtk_box_pack_start (GTK_BOX (box), button, FALSE, TRUE, 0);
g_signal_connect_object (button, "clicked",
G_CALLBACK (ephy_bookmark_properties_tag_widget_button_clicked_cb),
diff --git a/src/ephy-history-dialog.c b/src/ephy-history-dialog.c
index 1fc33860d..89a279fb7 100644
--- a/src/ephy-history-dialog.c
+++ b/src/ephy-history-dialog.c
@@ -457,7 +457,6 @@ create_row (EphyHistoryDialog *self,
g_object_set_data (G_OBJECT (row), "check-button", check_button);
gtk_widget_set_valign (check_button, GTK_ALIGN_CENTER);
gtk_widget_set_tooltip_text (check_button, _("Remove the selected pages from history"));
- gtk_button_set_relief (GTK_BUTTON (check_button), GTK_RELIEF_NONE);
g_signal_connect (check_button, "toggled", G_CALLBACK (row_check_button_toggled), self);
/* Copy URL button */
diff --git a/src/resources/gtk/bookmark-row.ui b/src/resources/gtk/bookmark-row.ui
index 2c6a18821..21372c7fc 100644
--- a/src/resources/gtk/bookmark-row.ui
+++ b/src/resources/gtk/bookmark-row.ui
@@ -27,13 +27,15 @@
<object class="GtkButton" id="properties_button">
<property name="visible">True</property>
<property name="receives_default">False</property>
- <property name="relief">none</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="icon_name">emblem-system-symbolic</property>
</object>
</child>
+ <style>
+ <class name="flat"/>
+ </style>
</object>
</child>
</object>
diff --git a/src/resources/gtk/page-row.ui b/src/resources/gtk/page-row.ui
index 72ab0780b..0cb1a93e5 100644
--- a/src/resources/gtk/page-row.ui
+++ b/src/resources/gtk/page-row.ui
@@ -60,7 +60,6 @@
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">Close page</property>
<property name="valign">center</property>
- <property name="relief">none</property>
<signal name="clicked" handler="close_clicked_cb" swapped="yes"/>
<child>
<object class="GtkImage">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]