Replace deprecated gtk_widget_size_request
This commit is contained in:
parent
46cea67258
commit
167ca75388
@ -136,10 +136,11 @@ shell_gtk_embed_get_preferred_width (ClutterActor *actor,
|
|||||||
if (embed->priv->window
|
if (embed->priv->window
|
||||||
&& gtk_widget_get_visible (GTK_WIDGET (embed->priv->window)))
|
&& gtk_widget_get_visible (GTK_WIDGET (embed->priv->window)))
|
||||||
{
|
{
|
||||||
GtkRequisition requisition;
|
GtkRequisition min_req, natural_req;
|
||||||
gtk_widget_size_request (GTK_WIDGET (embed->priv->window), &requisition);
|
gtk_widget_get_preferred_size (GTK_WIDGET (embed->priv->window), &min_req, &natural_req);
|
||||||
|
|
||||||
*min_width_p = *natural_width_p = requisition.width;
|
*min_width_p = min_req.width;
|
||||||
|
*natural_width_p = natural_req.width;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*min_width_p = *natural_width_p = 0;
|
*min_width_p = *natural_width_p = 0;
|
||||||
@ -156,10 +157,11 @@ shell_gtk_embed_get_preferred_height (ClutterActor *actor,
|
|||||||
if (embed->priv->window
|
if (embed->priv->window
|
||||||
&& gtk_widget_get_visible (GTK_WIDGET (embed->priv->window)))
|
&& gtk_widget_get_visible (GTK_WIDGET (embed->priv->window)))
|
||||||
{
|
{
|
||||||
GtkRequisition requisition;
|
GtkRequisition min_req, natural_req;
|
||||||
gtk_widget_size_request (GTK_WIDGET (embed->priv->window), &requisition);
|
gtk_widget_get_preferred_size (GTK_WIDGET (embed->priv->window), &min_req, &natural_req);
|
||||||
|
|
||||||
*min_height_p = *natural_height_p = requisition.height;
|
*min_height_p = min_req.height;
|
||||||
|
*natural_height_p = natural_req.height;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*min_height_p = *natural_height_p = 0;
|
*min_height_p = *natural_height_p = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user