summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErnestas Kulik <ernestask@gnome.org>2018-07-11 13:33:14 +0300
committerOndrej Holy <oholy@redhat.com>2021-11-22 15:16:18 +0000
commitf717ec01ab94bfcc1632885fd60a4f6f8ce5e4b0 (patch)
treec3ac336203b41cbb62f525a28f7f322d274b3dd0
parentc56ccce7916f8b857e28e7616d4ef7de12f1b209 (diff)
downloadnautilus-f717ec01ab94bfcc1632885fd60a4f6f8ce5e4b0.tar.gz
pathbar: Drop gtk_widget_{g,s}et_clip()
It's gone in GTK4 and removing this doesn't seem to cause any visual or behavorial change at the moment. Originally it was a workaround to some visual problem with button shadows. Our pathbar buttons don't have shadows nowadays, and even if testing with added shadows, there is no apparent issue nowadays. Rebased and ammended by António Fernandes <antoniof@gnome.org>
-rw-r--r--src/nautilus-pathbar.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index 5e3cdcb7c..53cbe1f5f 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -457,37 +457,6 @@ nautilus_path_bar_map (GtkWidget *widget)
GTK_WIDGET_CLASS (nautilus_path_bar_parent_class)->map (widget);
}
-#define BUTTON_BOTTOM_SHADOW 1
-
-static void
-union_with_clip (GtkWidget *widget,
- gpointer clip)
-{
- GtkAllocation widget_clip;
-
- if (!gtk_widget_is_drawable (widget))
- {
- return;
- }
-
- gtk_widget_get_clip (widget, &widget_clip);
-
- gdk_rectangle_union (&widget_clip, clip, clip);
-}
-
-static void
-_set_simple_bottom_clip (GtkWidget *widget,
- gint pixels)
-{
- GtkAllocation clip;
-
- gtk_widget_get_allocation (widget, &clip);
- clip.height += pixels;
-
- gtk_container_forall (GTK_CONTAINER (widget), union_with_clip, &clip);
- gtk_widget_set_clip (widget, &clip);
-}
-
/* This is a tad complicated */
static void
nautilus_path_bar_size_allocate (GtkWidget *widget,
@@ -516,7 +485,6 @@ nautilus_path_bar_size_allocate (GtkWidget *widget,
/* No path is set so we don't have to allocate anything. */
if (self->button_list == NULL)
{
- _set_simple_bottom_clip (widget, BUTTON_BOTTOM_SHADOW);
return;
}
direction = gtk_widget_get_direction (widget);
@@ -637,8 +605,6 @@ nautilus_path_bar_size_allocate (GtkWidget *widget,
child = BUTTON_DATA (list->data)->button;
gtk_widget_set_child_visible (child, FALSE);
}
-
- _set_simple_bottom_clip (widget, BUTTON_BOTTOM_SHADOW);
}
static void