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



2014-10-28 13:22 GMT+01:00 Gaute Hope <eg gaute vetsj com>:
Excerpts from Gaute Hope's message of October 23, 2014 11:05:

Excerpts from Kjell Ahlstedt's message of October 23, 2014 10:58:

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.


I did, it does get called. I also tried overriding
get_preferred_height_for_width_vfunc(), but to no avail. I have tried
just setting the value of minimum_height and natural_height to some
integer (5000), but it makes no difference in 3.14 (it does in 3.12).


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 (and set the values to a positive
int) I get an assertion failure upon runtime.

Is this expected behaviour? If so, I could not find any documentation.

gtkmm is just a wrapper and by itself usually does not add any
policies, but instead it follows ones imposed by wrapped C library. In
this case it is GTK+. It is always good to consult the wrapped library
docs as a fallback. It has a section about geometry management[1].
Should be helpful in your case.

[1] https://developer.gnome.org/gtk3/stable/GtkWidget.html#geometry-management




Cheers, Gaute

_______________________________________________
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]