[gnome-control-center/wip/datetime-redesign: 7/13] datetime: Show the timezone map in the original, unscaled size



commit 4fefb5a2f9af448b85807b4a882a14a1cf3a489a
Author: Kalev Lember <kalevlember gmail com>
Date:   Wed Sep 4 00:26:00 2013 +0200

    datetime: Show the timezone map in the original, unscaled size
    
    https://bugzilla.gnome.org/show_bug.cgi?id=694985

 panels/datetime/cc-timezone-map.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/panels/datetime/cc-timezone-map.c b/panels/datetime/cc-timezone-map.c
index 424f07e..5ef41e8 100644
--- a/panels/datetime/cc-timezone-map.c
+++ b/panels/datetime/cc-timezone-map.c
@@ -187,13 +187,15 @@ cc_timezone_map_get_preferred_width (GtkWidget *widget,
                                      gint      *minimum,
                                      gint      *natural)
 {
-  /* choose a minimum size small enough to prevent the window
-   * from growing horizontally
-   */
+  CcTimezoneMapPrivate *priv = CC_TIMEZONE_MAP (widget)->priv;
+  gint size;
+
+  size = gdk_pixbuf_get_width (priv->orig_background);
+
   if (minimum != NULL)
-    *minimum = 300;
+    *minimum = size;
   if (natural != NULL)
-    *natural = 300;
+    *natural = size;
 }
 
 static void
@@ -204,10 +206,8 @@ cc_timezone_map_get_preferred_height (GtkWidget *widget,
   CcTimezoneMapPrivate *priv = CC_TIMEZONE_MAP (widget)->priv;
   gint size;
 
-  /* The + 20 here is a slight tweak to make the map fill the
-   * panel better without causing horizontal growing
-   */
-  size = 300 * gdk_pixbuf_get_height (priv->orig_background) / gdk_pixbuf_get_width (priv->orig_background) 
+ 20;
+  size = gdk_pixbuf_get_height (priv->orig_background);
+
   if (minimum != NULL)
     *minimum = size;
   if (natural != NULL)


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