mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 14:30:15 +00:00
gtk: queue_resize() the GtkCellView when its cells change
in pack_start(), pack_end(), clear(), also queue_resize() in set_model(). Remove calls to queue_draw() in other functions that already call queue_resize().
This commit is contained in:
parent
efa63c5970
commit
1a4132a72e
@ -580,6 +580,8 @@ gtk_cell_view_cell_layout_pack_start (GtkCellLayout *layout,
|
||||
info->pack = GTK_PACK_START;
|
||||
|
||||
cellview->priv->cell_list = g_list_append (cellview->priv->cell_list, info);
|
||||
|
||||
gtk_widget_queue_resize (GTK_WIDGET (cellview));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -600,6 +602,8 @@ gtk_cell_view_cell_layout_pack_end (GtkCellLayout *layout,
|
||||
info->pack = GTK_PACK_END;
|
||||
|
||||
cellview->priv->cell_list = g_list_append (cellview->priv->cell_list, info);
|
||||
|
||||
gtk_widget_queue_resize (GTK_WIDGET (cellview));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -635,6 +639,8 @@ gtk_cell_view_cell_layout_clear (GtkCellLayout *layout)
|
||||
cellview->priv->cell_list = g_list_delete_link (cellview->priv->cell_list,
|
||||
cellview->priv->cell_list);
|
||||
}
|
||||
|
||||
gtk_widget_queue_resize (GTK_WIDGET (cellview));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -851,7 +857,6 @@ gtk_cell_view_set_value (GtkCellView *cell_view,
|
||||
|
||||
/* force resize and redraw */
|
||||
gtk_widget_queue_resize (GTK_WIDGET (cell_view));
|
||||
gtk_widget_queue_draw (GTK_WIDGET (cell_view));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -886,6 +891,8 @@ gtk_cell_view_set_model (GtkCellView *cell_view,
|
||||
|
||||
if (cell_view->priv->model)
|
||||
g_object_ref (cell_view->priv->model);
|
||||
|
||||
gtk_widget_queue_resize (GTK_WIDGET (cell_view));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -941,7 +948,6 @@ gtk_cell_view_set_displayed_row (GtkCellView *cell_view,
|
||||
|
||||
/* force resize and redraw */
|
||||
gtk_widget_queue_resize (GTK_WIDGET (cell_view));
|
||||
gtk_widget_queue_draw (GTK_WIDGET (cell_view));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user