+2008-08-06 Alejandro G. Castro <alex@igalia.com>
+
+ * src/hildon-pannable-area.c,
+ (hildon_pannable_area_realize),
+ (hildon_pannable_area_size_allocate): Code refactoring, add tests
+ for negative sizes.
+
2008-08-05 Claudio Saavedra <csaavedra@igalia.com>
* src/hildon-picker-dialog.c: (hildon_picker_dialog_init): Make the
attributes.x = widget->allocation.x + border_width;
attributes.y = widget->allocation.y + border_width;
- attributes.width = widget->allocation.width - 2 * border_width -
- (priv->vscroll ? priv->vscroll_rect.width : 0);
- attributes.height = widget->allocation.height - 2 * border_width -
- (priv->hscroll ? priv->hscroll_rect.height : 0);
+ attributes.width = MAX (widget->allocation.width - 2 * border_width -
+ (priv->vscroll ? priv->vscroll_rect.width : 0), 0);
+ attributes.height = MAX (widget->allocation.height - 2 * border_width -
+ (priv->hscroll ? priv->hscroll_rect.height : 0), 0);
attributes.window_type = GDK_WINDOW_CHILD;
attributes.event_mask = gtk_widget_get_events (widget)
| GDK_BUTTON_MOTION_MASK
widget->allocation = *allocation;
bin = GTK_BIN (widget);
+ hildon_pannable_area_refresh (HILDON_PANNABLE_AREA (widget));
+
priv = PANNABLE_AREA_PRIVATE (widget);
child_allocation.x = allocation->x + GTK_CONTAINER (widget)->border_width;
child_allocation.y = allocation->y + GTK_CONTAINER (widget)->border_width;
child_allocation.width = MAX (allocation->width -
- GTK_CONTAINER (widget)->border_width * 2, 0);
+ GTK_CONTAINER (widget)->border_width * 2 -
+ (priv->vscroll ? priv->vscroll_rect.width : 0), 0);
child_allocation.height = MAX (allocation->height -
- GTK_CONTAINER (widget)->border_width * 2, 0);
+ GTK_CONTAINER (widget)->border_width * 2 -
+ (priv->hscroll ? priv->hscroll_rect.height : 0), 0);
if (GTK_WIDGET_REALIZED (widget)) {
if (priv->event_window != NULL)
child_allocation.height);
}
- hildon_pannable_area_refresh (HILDON_PANNABLE_AREA (widget));
-
- child_allocation.width = MAX (child_allocation.width - (priv->vscroll ?
- priv->vscroll_rect.width : 0),
- 0);
- child_allocation.height = MAX (child_allocation.height - (priv->hscroll ?
- priv->hscroll_rect.height : 0),
- 0);
-
if (priv->overshot_dist_y > 0) {
child_allocation.y = MIN (child_allocation.y + priv->overshot_dist_y,
allocation->y + child_allocation.height);