Re: get_preferred_height_vfunc for Gtk::CellRenderer seems to have no effect on 3.14 to the mailing list gtkmm-list



Have you checked if your get_preferred_height_vfunc() is called? Perhaps now the get_preferred_height_for_width_vfunc() is called, and you need to override that function too. It might have changed, if some container widget has been changed between 3.12 and 3.14.

Kjell

Den 2014-10-23 09:05, Gaute Hope skrev:
Hi list,

after upgrading gtkmm and gtk to 3.14 (from 3.12 on Arch Linux) my
custom CellRenderer is no longer able to set the height of its cell. I
have only this column.

I overload the get_preferred_height_vfunc according to the reference [0] by
doing:

     virtual void get_preferred_height_vfunc (
         Gtk::Widget& widget,
         int& minimum_height,
         int& natural_height) const override;

no matter what values I set minimum_height or natural_height to the rows
in the treeview (liststore) have the same (too narrow) height. Is there
some other way I should be doing this or is this a bug [1]?

The full code for the cell renderer can be found here:
- https://github.com/gauteh/astroid/blob/master/src/modes/thread_index_list_cell_renderer.hh
- https://github.com/gauteh/astroid/blob/master/src/modes/thread_index_list_cell_renderer.cc

while the treeview can be found here:
- https://github.com/gauteh/astroid/blob/master/src/modes/thread_index_list_view.cc#L98


Cheers, Gaute

[0] https://developer.gnome.org/gtkmm/stable/classGtk_1_1CellRenderer.html#acffeffa12b2d07105dceeb8672f33572
[1] https://bugzilla.gnome.org/show_bug.cgi?id=738923

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
https://mail.gnome.org/mailman/listinfo/gtkmm-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]