From 7b3de2d5529c7902318130a5a23247b841c0c4b1 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Tue, 4 Jan 2011 02:35:19 +0100 Subject: [PATCH] Make GtkHandleBox size request code use GtkStyleContext for padding --- gtk/gtkhandlebox.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gtk/gtkhandlebox.c b/gtk/gtkhandlebox.c index bb5249209b..c96f66579d 100644 --- a/gtk/gtkhandlebox.c +++ b/gtk/gtkhandlebox.c @@ -611,11 +611,19 @@ gtk_handle_box_size_request (GtkWidget *widget, } else { + GtkStyleContext *context; + GtkStateFlags state; + GtkBorder padding; + + context = gtk_widget_get_style_context (widget); + state = gtk_widget_get_state_flags (widget); + gtk_style_context_get_padding (context, state, &padding); + if (handle_position == GTK_POS_LEFT || handle_position == GTK_POS_RIGHT) - requisition->height += gtk_widget_get_style (widget)->ythickness; + requisition->height += padding.top; else - requisition->width += gtk_widget_get_style (widget)->xthickness; + requisition->width += padding.left; } } else