The attached patch adds caps for opening a new window that just contains a graph to Gnumeric. caveats 1 we sometimes display scrollbars although it isn't aesthetically pleasing (fit to height/width). This is due to GtkScrolledWindow allocation issues. Without proper height-by-width management in GTK+, I don't think it's fixable. 2 if the graph window persists longer than all the other toplevels, the gnumeric shutdown functions spit warnings about non-freed ressources. I see two ways of resolving this: - set destroy_with_parent for the graph window. This requires an API for getting the window a sheet object is associated with - add a global list of graph windows, which are all destroyed before the ressource check runs 3 the % sizes of the graph are relative to the window size, not absolute to the passed-in graph size. This makes sense if you consider that for fullscreen presentation, one often wants to zoom in. 4 + w->zoom_factor > 1.0 ? + w->height < w->width * w->aspect_ratio : + w->height > w->width * w->aspect_ratio)) is a bit fishy. However, I supposed that if one has an aspect ratio of 1.0, he expects the widget to scale like in the pie-demo. If the aspect ratio is bigger, and no explicit reference direction is set, I use the (relative) longer dimension, since using the shorter causes issues where scrolling takes place with a hoffset/voffset != 0, which looks ugly. 5 the graph size in the window is wrong compared to the sheet object graph size, it seems like by a constant factor 6 gog_object_get_child_by_name was added just for API completeness. It is not needed by the rest of the patch. -- Christian Neumair <chris gnome-de org>
Attachment:
gnumeric-graph-viewer.diff
Description: Text Data
Attachment:
goffice-graph-widget.diff
Description: Text Data
Attachment:
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil