[gnome-nibbles] Force a minumum size (800x600), also helps for background resizing Closes bug#721599



commit 55e4d7b91c06b1409cd59ac58c264ac96cd9ef77
Author: Bryan Quigley <bryanquigs src gnome org>
Date:   Thu Jan 30 23:51:36 2014 -0500

    Force a minumum size (800x600), also helps for background resizing
    Closes bug#721599

 src/main.c       |    9 ++++++++-
 src/properties.c |    4 ++--
 2 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index 43c0a7a..99d6b3b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -573,6 +573,9 @@ activate (GtkApplication* app,
 {
   GtkWidget *window;
   GtkWidget *label;
+  GdkGeometry size_hints = {
+    800, 600, 0, 0, 800, 600, 0, 0, 0.0, 0.0, GDK_GRAVITY_NORTH_WEST  
+  };
 
   GtkWidget *vbox;
   ClutterColor stage_color = {0x00,0x00,0x00,0xff};
@@ -582,7 +585,11 @@ activate (GtkApplication* app,
   GtkBuilder *builder;
 
   window = gtk_application_window_new (app);
-  gtk_window_set_default_size (GTK_WINDOW (window), 800, 600);
+
+  gtk_window_set_geometry_hints (GTK_WINDOW (window),
+                    window,
+                    &size_hints,
+                    GDK_HINT_MIN_SIZE);
 
   g_action_map_add_action_entries (G_ACTION_MAP (app), app_entries, G_N_ELEMENTS (app_entries), app);
 
diff --git a/src/properties.c b/src/properties.c
index c76048a..33f853e 100644
--- a/src/properties.c
+++ b/src/properties.c
@@ -118,8 +118,8 @@ gnibbles_properties_update (GnibblesProperties * tmp)
   sound_enable (tmp->sound);
 
   tmp->tilesize = g_settings_get_int (settings, "tile-size");
-  if (tmp->tilesize < 1)
-    tmp->tilesize = 5;
+  if (tmp->tilesize < 8)
+    tmp->tilesize = 8;
   if (tmp->tilesize > 30)
     tmp->tilesize = 30;
 


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