[gnome-initial-setup/small-screen: 3/3] Drop the minimum size when we are on a small screen



commit de083b1fdada26a198c24abacf28deccd2ace6a6
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Nov 3 17:14:07 2014 -0500

    Drop the minimum size when we are on a small screen
    
    We were hardcoding a minimum size of 1024x768. Stop doing that
    on small screens, and maximize the window instead.

 gnome-initial-setup/gis-driver.c |   23 +++++++++++++++--------
 1 files changed, 15 insertions(+), 8 deletions(-)
---
diff --git a/gnome-initial-setup/gis-driver.c b/gnome-initial-setup/gis-driver.c
index 094d882..e9f63e4 100644
--- a/gnome-initial-setup/gis-driver.c
+++ b/gnome-initial-setup/gis-driver.c
@@ -98,14 +98,21 @@ prepare_main_window (GisDriver *driver)
   GisDriverPrivate *priv = gis_driver_get_instance_private (driver);
   GdkGeometry size_hints;
 
-  size_hints.min_width = 1024;
-  size_hints.min_height = 768;
-  size_hints.win_gravity = GDK_GRAVITY_CENTER;
-
-  gtk_window_set_geometry_hints (priv->main_window,
-                                 NULL,
-                                 &size_hints,
-                                 GDK_HINT_MIN_SIZE | GDK_HINT_WIN_GRAVITY);
+  if (gis_driver_is_small_screen (driver))
+    {
+      gtk_window_maximize (priv->main_window);
+    }
+  else
+    {
+      size_hints.min_width = 1024;
+      size_hints.min_height = 768;
+      size_hints.win_gravity = GDK_GRAVITY_CENTER;
+
+      gtk_window_set_geometry_hints (priv->main_window,
+                                     NULL,
+                                     &size_hints,
+                                     GDK_HINT_MIN_SIZE | GDK_HINT_WIN_GRAVITY);
+    }
 
   gtk_window_set_titlebar (priv->main_window,
                            gis_assistant_get_titlebar (priv->assistant));


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