aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberto Garcia <agarcia@igalia.com>2010-03-04 15:51:51 +0100
committerClaudio Saavedra <csaavedra@igalia.com>2010-03-16 17:33:35 +0200
commitba23fa30ba82ca8ef936b8823e60c6e98c22cd00 (patch)
tree6eaba68bed84b165347cee2d362dfdc3741bcebf
parent9231d785df32cb6a80dea5bc851beb6a52edc608 (diff)
Compute the HildonPickerDialog size request correctly in portrait mode
Fixes: NB#158695 (HildonTouchSelector looks bad in portrait mode) Signed-off-by: Claudio Saavedra <csaavedra@igalia.com>
-rw-r--r--hildon/hildon-picker-dialog.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/hildon/hildon-picker-dialog.c b/hildon/hildon-picker-dialog.c
index 35bcf58..14e1c1d 100644
--- a/hildon/hildon-picker-dialog.c
+++ b/hildon/hildon-picker-dialog.c
@@ -348,6 +348,7 @@ hildon_picker_dialog_size_request (GtkWidget *widget,
if (selector) {
GtkRequisition child_requisition;
GtkRequisition optimal_requisition;
+ GtkRequisition selector_requisition;
GtkBin *bin;
guint max_height;
@@ -359,16 +360,20 @@ hildon_picker_dialog_size_request (GtkWidget *widget,
/* assure the requisition is done */
gtk_widget_size_request (bin->child, &child_requisition);
+ gtk_widget_get_child_requisition (selector, &selector_requisition);
hildon_touch_selector_optimal_size_request (selector,
&optimal_requisition);
requisition->width += child_requisition.width;
+ requisition->height += child_requisition.height;
max_height = hildon_picker_dialog_get_max_height (HILDON_PICKER_DIALOG (widget));
requisition->height = MIN (max_height,
- requisition->height + optimal_requisition.height);
+ requisition->height +
+ optimal_requisition.height -
+ selector_requisition.height);
} else
GTK_WIDGET_CLASS (hildon_picker_dialog_parent_class)->size_request
(widget, requisition);