+/**
+ * hildon_button_set_alignment:
+ * @button: a #HildonButton
+ * @xalign: the horizontal alignment of the contents, from 0 (left) to 1 (right).
+ * @yalign: the vertical alignment of the contents, from 0 (top) to 1 (bottom).
+ * @xscale: the amount that the child widget expands horizontally to fill up unused space, from 0 to 1
+ * @yscale: the amount that the child widget expands vertically to fill up unused space, from 0 to 1
+ *
+ * Sets the alignment of the contents of the widget. If you don't need
+ * to change @xscale or @yscale you can just use
+ * gtk_button_set_alignment() instead.
+ **/
+void
+hildon_button_set_alignment (HildonButton *button,
+ gfloat xalign,
+ gfloat yalign,
+ gfloat xscale,
+ gfloat yscale)
+{
+ HildonButtonPrivate *priv;
+ GtkWidget *child;
+
+ g_return_if_fail (HILDON_IS_BUTTON (button));
+
+ priv = HILDON_BUTTON_GET_PRIVATE (button);
+
+ child = gtk_bin_get_child (GTK_BIN (button));
+
+ if (GTK_IS_ALIGNMENT (child)) {
+ gtk_button_set_alignment (GTK_BUTTON (button), xalign, yalign);
+ g_object_set (child, "xscale", xscale, "yscale", yscale, NULL);
+ }
+}
+
+/**
+ * hildon_button_set_title_alignment:
+ * @button: a #HildonButton
+ * @xalign: the horizontal alignment of the title label, from 0 (left) to 1 (right).
+ * @yalign: the vertical alignment of the title label, from 0 (top) to 1 (bottom).
+ *
+ * Sets the alignment of the title label. See also
+ * hildon_button_set_alignment() to set the alignment of the whole
+ * contents of the button.
+ **/
+void
+hildon_button_set_title_alignment (HildonButton *button,
+ gfloat xalign,
+ gfloat yalign)
+{
+ HildonButtonPrivate *priv;
+
+ g_return_if_fail (HILDON_IS_BUTTON (button));
+
+ priv = HILDON_BUTTON_GET_PRIVATE (button);
+
+ gtk_misc_set_alignment (GTK_MISC (priv->title), xalign, yalign);
+}
+
+/**
+ * hildon_button_set_value_alignment:
+ * @button: a #HildonButton
+ * @xalign: the horizontal alignment of the value label, from 0 (left) to 1 (right).
+ * @yalign: the vertical alignment of the value label, from 0 (top) to 1 (bottom).
+ *
+ * Sets the alignment of the value label. See also
+ * hildon_button_set_alignment() to set the alignment of the whole
+ * contents of the button.
+ **/
+void
+hildon_button_set_value_alignment (HildonButton *button,
+ gfloat xalign,
+ gfloat yalign)
+{
+ HildonButtonPrivate *priv;
+
+ g_return_if_fail (HILDON_IS_BUTTON (button));
+
+ priv = HILDON_BUTTON_GET_PRIVATE (button);
+
+ gtk_misc_set_alignment (GTK_MISC (priv->value), xalign, yalign);
+}
+
+/**
+ * hildon_button_set_image_alignment:
+ * @button: a #HildonButton
+ * @xalign: the horizontal alignment of the image, from 0 (left) to 1 (right).
+ * @yalign: the vertical alignment of the image, from 0 (top) to 1 (bottom).
+ *
+ * Sets the alignment of the image. See also
+ * hildon_button_set_alignment() to set the alignment of the whole
+ * contents of the button.
+ **/
+void
+hildon_button_set_image_alignment (HildonButton *button,
+ gfloat xalign,
+ gfloat yalign)
+{
+ HildonButtonPrivate *priv;
+
+ g_return_if_fail (HILDON_IS_BUTTON (button));
+
+ priv = HILDON_BUTTON_GET_PRIVATE (button);
+
+ /* Return if there's nothing to do */
+ if (priv->image_xalign == xalign && priv->image_yalign == yalign)
+ return;
+
+ priv->image_xalign = xalign;
+ priv->image_yalign = yalign;
+
+ hildon_button_construct_child (button);
+}
+