notebook: Use gtk_widget_measure

This commit is contained in:
Timm Bäder 2017-02-18 11:12:24 +01:00
parent 4c94242988
commit e1f8d5a647

View File

@ -4544,10 +4544,8 @@ allocate_tab (GtkCssGadget *gadget,
{ {
if (priv->tab_pos == GTK_POS_TOP || priv->tab_pos == GTK_POS_BOTTOM) if (priv->tab_pos == GTK_POS_TOP || priv->tab_pos == GTK_POS_BOTTOM)
{ {
gtk_widget_get_preferred_width_for_height (page->tab_label, gtk_widget_measure (page->tab_label, GTK_ORIENTATION_HORIZONTAL, allocation->height,
allocation->height, NULL, &child_allocation.width, NULL, NULL);
NULL,
&child_allocation.width);
if (child_allocation.width > allocation->width) if (child_allocation.width > allocation->width)
child_allocation.width = allocation->width; child_allocation.width = allocation->width;
else else
@ -4556,10 +4554,9 @@ allocate_tab (GtkCssGadget *gadget,
} }
else else
{ {
gtk_widget_get_preferred_height_for_width (page->tab_label, gtk_widget_measure (page->tab_label, GTK_ORIENTATION_VERTICAL, allocation->width,
allocation->width, NULL, &child_allocation.height, NULL, NULL);
NULL,
&child_allocation.height);
if (child_allocation.height > allocation->height) if (child_allocation.height > allocation->height)
child_allocation.height = allocation->height; child_allocation.height = allocation->height;
else else