Commit a553cb50 authored by Matthias Clasen's avatar Matthias Clasen

Use gtk_widget_get_allocated_width/height where it makes sense

parent 53ce519b
......@@ -4875,7 +4875,6 @@ gtk_menu_scroll_to (GtkMenu *menu,
gint offset)
GtkMenuPrivate *priv = menu->priv;
GtkAllocation allocation;
GtkBorder arrow_border, padding;
GtkWidget *widget;
gint x, y;
......@@ -4892,9 +4891,8 @@ gtk_menu_scroll_to (GtkMenu *menu,
gtk_adjustment_set_value (priv->tearoff_adjustment, offset);
/* Move/resize the viewport according to arrows: */
gtk_widget_get_allocation (widget, &allocation);
view_width = allocation.width;
view_height = allocation.height;
view_width = gtk_widget_get_allocated_width (widget);
view_height = gtk_widget_get_allocated_height (widget);
gtk_widget_style_get (GTK_WIDGET (menu),
"vertical-padding", &vertical_padding,
......@@ -2222,8 +2222,8 @@ gtk_status_icon_position_menu (GtkMenu *menu,
gdk_window_get_origin (window, x, y);
gtk_widget_get_preferred_size (GTK_WIDGET (menu),
&menu_req, NULL);
menu_req.width = gtk_widget_get_allocated_width (GTK_WIDGET (menu));
menu_req.height = gtk_widget_get_allocated_height (GTK_WIDGET (menu));
gtk_widget_get_allocation (widget, &allocation);
if (_gtk_tray_icon_get_orientation (tray_icon) == GTK_ORIENTATION_VERTICAL)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment