-/*
+/* vim:set sw=4 expandtab cino=(0:
+ *
* This file is a part of hildon
*
* Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved.
f_alloc.x = img_alloc.x = allocation->x +
MAX (allocation->width - max_req.width, 0) / 2;
- /* allocate frame */
- if (GTK_WIDGET_VISIBLE (priv->frame)) {
+ /* calculate allocations */
+ if (GTK_WIDGET_VISIBLE (widget)) {
+ /* allocate frame */
gtk_widget_get_child_requisition (priv->frame, &req);
f_alloc.width = req.width;
f_alloc.height = max_req.height;
- }
- /* allocate icon */
- if (GTK_WIDGET_VISIBLE (priv->d_button_image)) {
+ /* allocate icon */
gtk_widget_get_child_requisition (priv->d_button_image,
&req);
img_alloc.x = f_alloc.x;
f_alloc.x += img_alloc.width + HILDON_MARGIN_DEFAULT;
}
- }
- if (GTK_WIDGET_VISIBLE (priv->d_button_image)) {
- gtk_widget_size_allocate (priv->d_button_image, &img_alloc);
- }
+ if (GTK_WIDGET_VISIBLE (priv->d_button_image)) {
+ gtk_widget_size_allocate (priv->d_button_image, &img_alloc);
+ }
- if (GTK_WIDGET_VISIBLE (priv->frame)) {
- gtk_widget_size_allocate (priv->frame, &f_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