Need for a way to know the natural size of any object.
Submitted by Jon Nordby
Link to original bug (#629794)
Description
By "natural size" I mean the size the rendered model will occupy if there are no external restrictions on its size.
Steps to reproduce:
- Create a graph widget with GogAreaPlot. Add it to a GtkWindow
- Add legend and populate with data
- Note that when running, making the window (and thus the allocation for the widget) big enough will result in the legend being shown with all legend items in one row. The legend will then have a certain height X just a bit smaller than the window height. Increasing the window height further will not influence X.
- Get a renderer for the graph view, update it with gog_renderer_update.
- Get the view of the legend, and use gog_view_size_request() with (constant) very large sizes for the "available" attribute. Note that at the moment, you will need to modify gog_renderer_update from destroying the renderer surface (last two lines).
Expected results: Height of the "required" GogViewRequisition equal to X, the height the legend had when the available area in the window was big enough. This should be independent of the size of the window the graph widget is in (as the sizes given to the renderer/view are not related to it).
Actual results: Height that depends on the window height. Works fine for available height bigger than X. For available heights slightly smaller than X it seems to almost work (the value is a bit low, but does not seem to be a relation to the actual window size). For small window heights it seems to return the height of the window.