diff options
author | Javier Jardón <jjardon@gnome.org> | 2010-06-02 06:28:22 +0200 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2010-07-13 19:40:46 +0200 |
commit | 3a10216dd01c8d10df235b88c8942b2fda15689b (patch) | |
tree | 80df10196e365741a9dcb6a8c773c1e992e3e9fe /gtk/gtkframe.c | |
parent | 009acc263e883923fd7c528c401f9d39756788aa (diff) | |
download | gtk+-3a10216dd01c8d10df235b88c8942b2fda15689b.tar.gz |
Use accessor functions to acces GtkContainer
Diffstat (limited to 'gtk/gtkframe.c')
-rw-r--r-- | gtk/gtkframe.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c index 01707fc19e..cb8ddd2b1b 100644 --- a/gtk/gtkframe.c +++ b/gtk/gtkframe.c @@ -681,6 +681,7 @@ gtk_frame_real_compute_child_allocation (GtkFrame *frame, GtkAllocation *allocation = &widget->allocation; GtkRequisition child_requisition; gint top_margin; + guint border_width; if (frame->label_widget) { @@ -689,14 +690,15 @@ gtk_frame_real_compute_child_allocation (GtkFrame *frame, } else top_margin = widget->style->ythickness; + + border_width = gtk_container_get_border_width (GTK_CONTAINER (frame)); - child_allocation->x = (GTK_CONTAINER (frame)->border_width + - widget->style->xthickness); + child_allocation->x = border_width + widget->style->xthickness; child_allocation->width = MAX(1, (gint)allocation->width - child_allocation->x * 2); - child_allocation->y = (GTK_CONTAINER (frame)->border_width + top_margin); + child_allocation->y = border_width + top_margin; child_allocation->height = MAX (1, ((gint)allocation->height - child_allocation->y - - (gint)GTK_CONTAINER (frame)->border_width - + border_width - (gint)widget->style->ythickness)); child_allocation->x += allocation->x; @@ -714,6 +716,7 @@ gtk_frame_get_size (GtkSizeRequest *request, GtkBin *bin = GTK_BIN (widget); gint child_min, child_nat; gint minimum, natural; + guint border_width; if (frame->label_widget && gtk_widget_get_visible (frame->label_widget)) { @@ -756,19 +759,17 @@ gtk_frame_get_size (GtkSizeRequest *request, } } + border_width = gtk_container_get_border_width (GTK_CONTAINER (widget)); + if (orientation == GTK_ORIENTATION_HORIZONTAL) { - minimum += (GTK_CONTAINER (widget)->border_width + - GTK_WIDGET (widget)->style->xthickness) * 2; - natural += (GTK_CONTAINER (widget)->border_width + - GTK_WIDGET (widget)->style->xthickness) * 2; + minimum += (border_width + GTK_WIDGET (widget)->style->xthickness) * 2; + natural += (border_width + GTK_WIDGET (widget)->style->xthickness) * 2; } else { - minimum += (GTK_CONTAINER (widget)->border_width + - GTK_WIDGET (widget)->style->ythickness) * 2; - natural += (GTK_CONTAINER (widget)->border_width + - GTK_WIDGET (widget)->style->ythickness) * 2; + minimum += (border_width + GTK_WIDGET (widget)->style->ythickness) * 2; + natural += (border_width + GTK_WIDGET (widget)->style->ythickness) * 2; } if (minimum_size) |