[libhandy] avatar: Take CSS size properties into account



commit f00772ae5ee8ae1679107ac2c7462f15270d3957
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Tue Dec 1 09:18:14 2020 +0100

    avatar: Take CSS size properties into account
    
    Fixes https://gitlab.gnome.org/GNOME/libhandy/-/issues/374

 src/hdy-avatar.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/hdy-avatar.c b/src/hdy-avatar.c
index cf73ce03..733552bd 100644
--- a/src/hdy-avatar.c
+++ b/src/hdy-avatar.c
@@ -15,6 +15,7 @@
 
 #include "hdy-avatar.h"
 #include "hdy-cairo-private.h"
+#include "hdy-css-private.h"
 
 #define NUMBER_OF_COLORS 14
 /**
@@ -444,6 +445,8 @@ hdy_avatar_measure (GtkWidget      *widget,
     *minimum = self->size;
   if (natural)
     *natural = self->size;
+
+  hdy_css_measure (widget, orientation, minimum, natural);
 }
 
 static void
@@ -496,6 +499,9 @@ hdy_avatar_size_allocate (GtkWidget     *widget,
 {
   GtkAllocation clip;
 
+  hdy_css_size_allocate_self (widget, allocation);
+  gtk_widget_set_allocation (widget, allocation);
+
   gtk_render_background_get_clip (gtk_widget_get_style_context (widget),
                                   allocation->x,
                                   allocation->y,


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