textutil: Stop using gtk_widget_get_allocation
authorMatthias Clasen <mclasen@redhat.com>
Fri, 28 Apr 2023 18:16:32 +0000 (14:16 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 28 Apr 2023 19:05:39 +0000 (15:05 -0400)
gtk/gtktextutil.c

index a7cc04da61119598c3b8ef2fc0cf5a7fbd1a1abf..5d3146b786a6e9681990700a5da35f5713e0df4c 100644 (file)
@@ -207,7 +207,6 @@ gtk_text_util_create_rich_drag_icon (GtkWidget     *widget,
                                      GtkTextIter   *start,
                                      GtkTextIter   *end)
 {
-  GtkAllocation      allocation;
   GdkPaintable      *paintable;
   GtkSnapshot       *snapshot;
   int                layout_width, layout_height;
@@ -244,8 +243,7 @@ gtk_text_util_create_rich_drag_icon (GtkWidget     *widget,
 
   style = gtk_text_attributes_new ();
 
-  gtk_widget_get_allocation (widget, &allocation);
-  layout_width = allocation.width;
+  layout_width = gtk_widget_get_width (widget);
 
   set_attributes_from_style (widget, style);