Looking at widget->requisition in size_allocate() is useless

Use the passed GtkAllocation for calculating things, not
widget->requisition.
This commit is contained in:
Michael Natterer 2009-08-01 18:59:58 +02:00
parent 2abca796bf
commit 656e30cd3a
1 changed files with 2 additions and 2 deletions

View File

@ -135,8 +135,8 @@ gimp_color_scale_size_allocate (GtkWidget *widget,
focus += focus_padding;
}
range->min_slider_size = (MIN (widget->requisition.width,
widget->requisition.height) - 2 * focus) / 2;
range->min_slider_size = (MIN (allocation->width,
allocation->height) - 2 * focus) / 2;
if (GTK_WIDGET_CLASS (parent_class)->size_allocate)
GTK_WIDGET_CLASS (parent_class)->size_allocate (widget, allocation);