GtkRequisition req;
GtkRequisition max_req;
GList *iter;
+ gboolean rtl;
g_assert (GTK_IS_WIDGET (widget));
g_assert (allocation != NULL);
ed = HILDON_DATE_EDITOR (widget);
priv = HILDON_DATE_EDITOR_GET_PRIVATE (ed);
+ rtl = (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL);
widget->allocation = *allocation;
gtk_widget_get_child_requisition (widget, &max_req);
f_alloc.width = req.width;
f_alloc.height = max_req.height;
- gtk_widget_size_allocate (priv->frame, &f_alloc);
}
/* allocate icon */
img_alloc.x += f_alloc.width + HILDON_MARGIN_DEFAULT;
img_alloc.width = req.width;
img_alloc.height = max_req.height;
+
+ if (rtl)
+ {
+ img_alloc.x = f_alloc.x;
+ f_alloc.x += img_alloc.width + HILDON_MARGIN_DEFAULT;
+ }
gtk_widget_size_allocate (priv->d_button_image, &img_alloc);
}
+ if (GTK_WIDGET_VISIBLE (priv->frame)) {
+ gtk_widget_size_allocate (priv->frame, &f_alloc);
+ }
+
/* FIXME: We really should not alloc delimeters by hand (since they
are not our own children, but we need to force to appear
higher. This ugly hack is needed to compensate the forced