GNOME Bugzilla – Bug 738923
get_preferred_height_vfunc in custom CellRenderer not respected after upgrade from 3.12 to 3.14
Last modified: 2018-04-15 00:31:44 UTC
Hi, I have created a custom CellRenderer in gtkmm. I have overloaded the method: virtual void get_preferred_height_vfunc ( Gtk::Widget& widget, int& minimum_height, int& natural_height) const override; and sets minimum_height and natural_height to calculate the height of my cell. After upgrading gtk+ and gtkmm to 3.14 from 3.12 the value I set using this function no longer has any effect. I do not know whether this is a gtkmm or gtk+ problem.
It turns out this was only a problem on my mac book pro with a retina screen (hidpi). When I overloaded the function: get_request_mode_vfunc and return CONSTANT_SIZE or HEIGHT_FOR_WIDTH and also wrap: get_preferred_width_vfunc (...) things work out. The return value of the latter functions seems to be irrelevant. But if I do not wrap it I get an assertion failure upon runtime. Is this expected behaviour? If so, I could not find any documentation. Cheers, Gaute
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla. If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab: https://gitlab.gnome.org/GNOME/gtk/issues/new