[gnome-nibbles] Set a size request for the clutter widget



commit cf926a56fab7917a937930f3258b5f2bd6913932
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sun May 11 11:11:45 2014 -0500

    Set a size request for the clutter widget
    
    This prevents us from resizing the window to ludicrously small sizes.
    
    Also, no longer set a default window size, since this is no longer
    required now that the clutter widget has a size request. GTK+ will pick
    a nice window size to fit the tile size.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=709595

 src/main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index 07c20df..c904455 100644
--- a/src/main.c
+++ b/src/main.c
@@ -599,7 +599,6 @@ activate (GtkApplication* app,
 
   window = gtk_application_window_new (app);
   gtk_window_set_titlebar (GTK_WINDOW (window), headerbar);
-  gtk_window_set_default_size (GTK_WINDOW (window), 800, 600);
 
   g_action_map_add_action_entries (G_ACTION_MAP (app), app_entries, G_N_ELEMENTS (app_entries), app);
 
@@ -670,6 +669,7 @@ activate (GtkApplication* app,
   clutter_actor_set_size (CLUTTER_ACTOR (stage),
                           properties->tilesize * BOARDWIDTH,
                           properties->tilesize * BOARDHEIGHT);
+  gtk_widget_set_size_request (clutter_widget, DEFAULT_WIDTH, DEFAULT_HEIGHT);
 
   vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]