From: Claudio Saavedra Date: Tue, 21 Jul 2009 16:58:45 +0000 (+0200) Subject: Ensure a minimum height for HildonEntry X-Git-Tag: 2.1.91-1~1 X-Git-Url: https://vcs.maemo.org/git/?p=hildon;a=commitdiff_plain;h=2b11e29d5aa540c12d67e088687814fbc8149e63 Ensure a minimum height for HildonEntry * 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) --- diff --git a/ChangeLog b/ChangeLog index c2e4992..f8bfd34 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2009-07-21 Claudio Saavedra + * 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 + * configure.ac: postrelease version bump. * debian/changelog: post release version bump @@ -33,6 +41,7 @@ 2009-07-16 Alejandro G. Castro + * 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 diff --git a/hildon/hildon-entry.c b/hildon/hildon-entry.c index eb8d22a..07f338b 100644 --- a/hildon/hildon-entry.c +++ b/hildon/hildon-entry.c @@ -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);