GNOME Bugzilla – Bug 677282
Allow GtkClutterEmbed to follow stage size
Last modified: 2012-06-05 10:42:04 UTC
In many cases its nice to be able to have the GtkClutterEmbed follow the layouted size of the stage. For instance in boxes or documents this means we can make sure the GtkWindow is never sized smaller than the toolbars, etc.
Created attachment 215428 [details] [review] Allow GtkClutterEmbed to follow the ClutterStage size This is nice when you combine Gtk and Clutter layouts, for instance to get a right minimum size for the window.
Review of attachment 215428 [details] [review]: ::: clutter-gtk/gtk-clutter-embed.c @@ +835,2 @@ embed->priv = priv = GTK_CLUTTER_EMBED_GET_PRIVATE (embed); + priv->honor_size = 1; oops, leftover debug stuff
Created attachment 215431 [details] [review] Allow GtkClutterEmbed to follow the ClutterStage size This is nice when you combine Gtk and Clutter layouts, for instance to get a right minimum size for the window.
Created attachment 215540 [details] [review] Allow GtkClutterEmbed to follow the ClutterStage size This is nice when you combine Gtk and Clutter layouts, for instance to get a right minimum size for the window.
Added a new version that calls the layout manager directly, as it turns out that the stage get_preferred_width/height calls are overridden to do non-standard things. With this in there layout seems to work properly for gnome-boxes.
Review of attachment 215540 [details] [review]: looks generally okay to me. ::: clutter-gtk/gtk-clutter-embed.c @@ +379,3 @@ + clutter_actor_get_layout_manager (priv->stage) != NULL) + { + minimal coding style fix: the curly brace should go on a separate line and indentation level. @@ +835,1 @@ missing property. @@ +914,3 @@ + +void +gtk_clutter_embed_set_honor_stage_size (GtkClutterEmbed *embed, missing gtk-doc annotation; missing arguments check. also, I'm not entirely convinced by the name; maybe set_use_layout_size() would be a better reflection of what it is that the property is doing. @@ +928,3 @@ + +gboolean + honor_size = !!honor_size; missing gtk-doc annotation; missing arguments check.
Created attachment 215617 [details] [review] Allow GtkClutterEmbed to follow the ClutterStage size This is nice when you combine Gtk and Clutter layouts, for instance to get a right minimum size for the window.
Created attachment 215619 [details] [review] Allow GtkClutterEmbed to follow the ClutterStage size This is nice when you combine Gtk and Clutter layouts, for instance to get a right minimum size for the window.
Review of attachment 215619 [details] [review]: looks good, thanks.
pushed