How to make a Gtk::IconView recompute and repaint its columns
- From: Todor Todorov <ttodorov gmx net>
- To: Gtkmm List <gtkmm-list gnome org>
- Subject: How to make a Gtk::IconView recompute and repaint its columns
- Date: Mon, 30 Nov 2009 17:12:52 -0500
Hello list,
I have a Gtk::IconView and a custom cell renderer for displaying
thumbnails. The cell renderer overrides the default size and paint
vfuncs and computes size/paints with regard to a current zoom value. The
relevant parts in the cell renderer are:
<code>
private:
Glib::Property< gdouble > propertyZoom;
public:
Glib::PropertyProxy< gdouble > property_thumb_zoom() { return
propertyZoom.get_proxy(); }
</code>
When the zoom changes via a slider, I do something like:
<code>
m_pCell->property_thumb_zoom() = slider->get_value();
m_pIconView->queue_draw();
</code>
That works OK with one exception: The cell render computes the new size
correctly and the thumbnails are redrawn according to the new zoom
value, but the icon view itself still paints the same number of columns
as it started out originally. Which makes icons encroach each others
space in case of zooming in, or way too big spaces between columns in
case of zooming out.
Any ideas how to fix that? Help is greatly appreciated.
Best regards,
Todor
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]