Fixed assertions in gtk_cell_renderer_get_aligned_area().

The assertions here were not accounting for the possiblility of
zero width visible renderers that are aligned completely to the
right (i.e. renderers with no content set for a said row).
This commit is contained in:
Tristan Van Berkom 2011-01-13 01:12:33 +09:00
parent aa1f58b731
commit 3492b1567d

View File

@ -1658,8 +1658,8 @@ gtk_cell_renderer_get_aligned_area (GtkCellRenderer *cell,
klass = GTK_CELL_RENDERER_GET_CLASS (cell);
klass->get_aligned_area (cell, widget, flags, cell_area, aligned_area);
g_assert (aligned_area->x >= cell_area->x && aligned_area->x < cell_area->x + cell_area->width);
g_assert (aligned_area->y >= cell_area->y && aligned_area->y < cell_area->y + cell_area->height);
g_assert (aligned_area->x >= cell_area->x && aligned_area->x <= cell_area->x + cell_area->width);
g_assert (aligned_area->y >= cell_area->y && aligned_area->y <= cell_area->y + cell_area->height);
g_assert ((aligned_area->x - cell_area->x) + aligned_area->width <= cell_area->width);
g_assert ((aligned_area->y - cell_area->y) + aligned_area->height <= cell_area->height);
}