diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-06-28 06:25:18 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-06-28 06:25:18 +0000 |
commit | 88e35848141721bf4c69501ae6b83995ead0ff18 (patch) | |
tree | c06d079218c611d4a841c84f133f8101966314eb | |
parent | 94f4c71eaa0f697501ffd2a32f4c898b7711fce3 (diff) | |
download | gdk-pixbuf-88e35848141721bf4c69501ae6b83995ead0ff18.tar.gz |
Make sure that cell boxes are always completely inside the item area.
2005-06-28 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkiconview.c (gtk_icon_view_calculate_item_size2):
Make sure that cell boxes are always completely inside
the item area.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 6 | ||||
-rw-r--r-- | gtk/gtkiconview.c | 25 |
4 files changed, 33 insertions, 10 deletions
@@ -1,3 +1,9 @@ +2005-06-28 Matthias Clasen <mclasen@redhat.com> + + * gtk/gtkiconview.c (gtk_icon_view_calculate_item_size2): + Make sure that cell boxes are always completely inside + the item area. + 2005-06-27 Matthias Clasen <mclasen@redhat.com> * demos/gtk-demo/main.c (create_tree): Make the list of diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 0518ac6d8..877b9a591 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2005-06-28 Matthias Clasen <mclasen@redhat.com> + + * gtk/gtkiconview.c (gtk_icon_view_calculate_item_size2): + Make sure that cell boxes are always completely inside + the item area. + 2005-06-27 Matthias Clasen <mclasen@redhat.com> * demos/gtk-demo/main.c (create_tree): Make the list of diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 0518ac6d8..877b9a591 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2005-06-28 Matthias Clasen <mclasen@redhat.com> + + * gtk/gtkiconview.c (gtk_icon_view_calculate_item_size2): + Make sure that cell boxes are always completely inside + the item area. + 2005-06-27 Matthias Clasen <mclasen@redhat.com> * demos/gtk-demo/main.c (create_tree): Make the list of diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c index 349884674..480013259 100644 --- a/gtk/gtkiconview.c +++ b/gtk/gtkiconview.c @@ -2662,7 +2662,7 @@ gtk_icon_view_calculate_item_size2 (GtkIconView *icon_view, if (icon_view->priv->orientation == GTK_ORIENTATION_HORIZONTAL) { - cell_area.width = item->box[i].width; + cell_area.width = item->box[info->position].width; cell_area.height = item->height; } else @@ -2673,21 +2673,26 @@ gtk_icon_view_calculate_item_size2 (GtkIconView *icon_view, gtk_cell_renderer_get_size (info->cell, GTK_WIDGET (icon_view), &cell_area, - &item->box[i].x, &item->box[i].y, - &item->box[i].width, &item->box[i].height); - item->box[i].x += cell_area.x; - item->box[i].y += cell_area.y; + &item->box[info->position].x, &item->box[info->position].y, + &item->box[info->position].width, &item->box[info->position].height); + item->box[info->position].x += cell_area.x; + item->box[info->position].y += cell_area.y; if (icon_view->priv->orientation == GTK_ORIENTATION_HORIZONTAL) { - item->before[i] = item->box[i].x - cell_area.x; - item->after[i] = cell_area.width - item->box[i].width - item->before[i]; + item->before[info->position] = item->box[info->position].x - cell_area.x; + item->after[info->position] = cell_area.width - item->box[info->position].width - item->before[info->position]; cell_area.x += cell_area.width + spacing; } else { - item->before[i] = item->box[i].y - cell_area.y; - item->after[i] = cell_area.height - item->box[i].height - item->before[i]; + if (item->box[info->position].width > item->width) + { + item->width = item->box[info->position].width; + cell_area.width = item->width; + } + item->before[info->position] = item->box[info->position].y - cell_area.y; + item->after[info->position] = cell_area.height - item->box[info->position].height - item->before[info->position]; cell_area.y += cell_area.height + spacing; } } @@ -2814,7 +2819,7 @@ gtk_icon_view_paint_item (GtkIconView *icon_view, cell_area.width, cell_area.height); gtk_icon_view_get_cell_box (icon_view, item, info, &box); - + gdk_draw_rectangle (drawable, GTK_WIDGET (icon_view)->style->black_gc, FALSE, |