Ensure a minimum height for HildonEntry
authorClaudio Saavedra <csaavedra@igalia.com>
Tue, 21 Jul 2009 16:58:45 +0000 (18:58 +0200)
committerClaudio Saavedra <csaavedra@igalia.com>
Tue, 21 Jul 2009 16:58:45 +0000 (18:58 +0200)
* hildon/hildon-entry.c: (set_property): Do not allow to set
automatic height and use finger height instead, to prevent an to
have a smaller size than than its theme pixbuf.

Fixes: NB#118398 (HildonEntry - unnecessary rescaling of images)

ChangeLog
hildon/hildon-entry.c

index c2e4992..f8bfd34 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2009-07-21  Claudio Saavedra  <csaavedra@igalia.com>
 
+       * hildon/hildon-entry.c: (set_property): Do not allow to set
+       automatic height and use finger height instead, to prevent an to
+       have a smaller size than than its theme pixbuf.
+
+       Fixes: NB#118398 (HildonEntry - unnecessary rescaling of images)
+
+2009-07-21  Claudio Saavedra  <csaavedra@igalia.com>
+
        * configure.ac: postrelease version bump.
        * debian/changelog: post release version bump
 
@@ -33,6 +41,7 @@
 
 2009-07-16  Alejandro G. Castro  <alex@igalia.com>
 
+
        * hildon/hildon-text-view.c,
        (hildon_text_view_button_press_event): Grabbed the focus in button
        press, this way we are sure the widget has the focus in the
index eb8d22a..07f338b 100644 (file)
@@ -74,10 +74,16 @@ set_property                                    (GObject      *object,
                                                  const GValue *value,
                                                  GParamSpec   *pspec)
 {
+    HildonSizeType size;
+
     switch (prop_id)
     {
     case PROP_SIZE:
-        hildon_gtk_widget_set_theme_size (GTK_WIDGET (object), g_value_get_flags (value));
+       size = g_value_get_flags (value);
+       /* If this is auto height, default to finger height. */
+       if (!(size & (HILDON_SIZE_FINGER_HEIGHT | HILDON_SIZE_THUMB_HEIGHT)))
+         size |= HILDON_SIZE_FINGER_HEIGHT;
+       hildon_gtk_widget_set_theme_size (GTK_WIDGET (object), size);
         break;
     default:
         G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);