forked from AuroraMiddleware/gtk
Changed initial values for requisition from -1 to 0.
When doing size-requests and get_natural_size() calls, use 0 as the base value instead of -1, because size_request code assumes that widget->requesition is initialized at 0.
This commit is contained in:
parent
75b8f7d3ae
commit
4b1315cedc
@ -670,9 +670,9 @@ do_size_request (GtkWidget *widget)
|
||||
* Note here that there is no convention of filling the argument or widget->requisition,
|
||||
* so we have no choice but to fire size request with this pointer.
|
||||
*/
|
||||
g_signal_emit_by_name (widget,
|
||||
"size-request",
|
||||
&widget->requisition);
|
||||
widget->requisition.width = 0;
|
||||
widget->requisition.height = 0;
|
||||
g_signal_emit_by_name (widget, "size-request", &widget->requisition);
|
||||
|
||||
/* Now get the extended layout minimum and natural size
|
||||
*/
|
||||
|
@ -10724,16 +10724,10 @@ gtk_widget_real_get_desired_size (GtkExtendedLayout *layout,
|
||||
* on the "size-request" collected values (see gtksizegroup.c:do_size_request()).
|
||||
*/
|
||||
if (minimum_size)
|
||||
{
|
||||
minimum_size->width = -1;
|
||||
minimum_size->height = -1;
|
||||
}
|
||||
memset (minimum_size, 0x0, sizeof (GtkRequisition));
|
||||
|
||||
if (natural_size)
|
||||
{
|
||||
natural_size->width = -1;
|
||||
natural_size->height = -1;
|
||||
}
|
||||
memset (natural_size, 0x0, sizeof (GtkRequisition));
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user