[gnome-control-center] shell: allow the shell to shrink smaller than it's initial size



commit 554e23aaf2330a7814efbb689e16fdfbab83c8eb
Author: Thomas Wood <thomas wood intel com>
Date:   Fri Jul 16 15:18:07 2010 +0100

    shell: allow the shell to shrink smaller than it's initial size
    
    Reset the size request when opening a panel so that the new size can be
    smaller than the size of the main view.

 shell/gnome-control-center.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/shell/gnome-control-center.c b/shell/gnome-control-center.c
index 43449f8..2c4e1ef 100644
--- a/shell/gnome-control-center.c
+++ b/shell/gnome-control-center.c
@@ -157,10 +157,10 @@ activate_panel (GnomeControlCenter *shell,
 
           gtk_widget_show (panel);
 
+          /* resize to the preferred size of the panel */
+          gtk_widget_set_size_request (priv->window, -1, -1);
           gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->window), &min,
                                      &nat);
-
-          /* resize to the preferred size of the panel */
           gtk_window_resize (GTK_WINDOW (priv->window), nat.width, nat.height);
           return;
         }
@@ -225,8 +225,14 @@ shell_show_overview_page (GnomeControlCenterPrivate *priv)
 
   /* resize back to the original overview size */
   if (priv->overview_width > 0 && priv->overview_height > 0)
-    gtk_window_resize (GTK_WINDOW (priv->window), priv->overview_width,
-                       priv->overview_height);
+    {
+      gtk_widget_set_size_request (priv->window,
+                                   priv->overview_width,
+                                   priv->overview_height);
+      gtk_window_resize (GTK_WINDOW (priv->window),
+                         priv->overview_width,
+                         priv->overview_height);
+    }
 }
 
 



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