toolbar: Avoid a get_own_allocation call

We want the content allocation here since we are allocation child
widgets.
This commit is contained in:
Timm Bäder 2018-04-07 09:26:31 +02:00
parent 44390c16b2
commit 3593fd2a29

View File

@ -1005,7 +1005,10 @@ gtk_toolbar_begin_sliding (GtkToolbar *toolbar)
g_source_set_name_by_id (priv->idle_id, "[gtk+] slide_idle_handler");
}
gtk_widget_get_own_allocation (widget, &content_allocation);
content_allocation.x = 0;
content_allocation.y = 0;
content_allocation.width = gtk_widget_get_width (widget);
content_allocation.height = gtk_widget_get_height (widget);
rtl = (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL);
vertical = (priv->orientation == GTK_ORIENTATION_VERTICAL);
@ -1021,9 +1024,6 @@ gtk_toolbar_begin_sliding (GtkToolbar *toolbar)
cur_y = 0;
}
cur_x += content_allocation.x;
cur_y += content_allocation.y;
for (list = priv->content; list != NULL; list = list->next)
{
ToolbarContent *content = list->data;