[gnome-control-center] datetime: Show the timezone map in the original, unscaled size
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] datetime: Show the timezone map in the original, unscaled size
- Date: Tue, 20 Aug 2013 00:24:52 +0000 (UTC)
commit 9a3265de24130b0d540b62469e658f596396d780
Author: Kalev Lember <kalevlember gmail com>
Date: Sun Aug 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]