summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniojpfernandes@gmail.com>2022-03-27 14:59:10 +0000
committerAntónio Fernandes <antoniojpfernandes@gmail.com>2022-03-27 14:59:10 +0000
commit351ffef70481c109f151b6fef84060c4e4847b43 (patch)
tree505ed5ef911f174ffec6b6dfb031b293297dd7d5
parenta1ddd3fead941bedf30a172048f65cf4b0e05c09 (diff)
downloadgtk+-351ffef70481c109f151b6fef84060c4e4847b43.tar.gz
overlaylayout: Set position style class on child
As documented: > Overlay children whose alignments cause them to be positioned > at an edge get the style classes “.left”, “.right”, “.top”, > and/or “.bottom” according to their position. Likely accidental regression in b7ee2cbc289b4ab8a950cd77bdcd69a6f13932a7 Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2099
-rw-r--r--gtk/gtkoverlaylayout.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/gtk/gtkoverlaylayout.c b/gtk/gtkoverlaylayout.c
index bc457719d6..93c88c746d 100644
--- a/gtk/gtkoverlaylayout.c
+++ b/gtk/gtkoverlaylayout.c
@@ -346,10 +346,10 @@ gtk_overlay_child_update_style_classes (GtkOverlay *overlay,
gboolean is_left, is_right, is_top, is_bottom;
gboolean has_left, has_right, has_top, has_bottom;
- has_left = gtk_widget_has_css_class (widget, "left");
- has_right = gtk_widget_has_css_class (widget, "right");
- has_top = gtk_widget_has_css_class (widget, "top");
- has_bottom = gtk_widget_has_css_class (widget, "bottom");
+ has_left = gtk_widget_has_css_class (child, "left");
+ has_right = gtk_widget_has_css_class (child, "right");
+ has_top = gtk_widget_has_css_class (child, "top");
+ has_bottom = gtk_widget_has_css_class (child, "bottom");
is_left = is_right = is_top = is_bottom = FALSE;
@@ -372,24 +372,24 @@ gtk_overlay_child_update_style_classes (GtkOverlay *overlay,
is_bottom = (child_allocation->y + child_allocation->height == height);
if (has_left && !is_left)
- gtk_widget_remove_css_class (widget, "left");
+ gtk_widget_remove_css_class (child, "left");
else if (!has_left && is_left)
- gtk_widget_add_css_class (widget, "left");
+ gtk_widget_add_css_class (child, "left");
if (has_right && !is_right)
- gtk_widget_remove_css_class (widget, "right");
+ gtk_widget_remove_css_class (child, "right");
else if (!has_right && is_right)
- gtk_widget_add_css_class (widget, "right");
+ gtk_widget_add_css_class (child, "right");
if (has_top && !is_top)
- gtk_widget_remove_css_class (widget, "top");
+ gtk_widget_remove_css_class (child, "top");
else if (!has_top && is_top)
- gtk_widget_add_css_class (widget, "top");
+ gtk_widget_add_css_class (child, "top");
if (has_bottom && !is_bottom)
- gtk_widget_remove_css_class (widget, "bottom");
+ gtk_widget_remove_css_class (child, "bottom");
else if (!has_bottom && is_bottom)
- gtk_widget_add_css_class (widget, "bottom");
+ gtk_widget_add_css_class (child, "bottom");
}
static void