[gtk+] Make GtkHandleBox size request code use GtkStyleContext for padding
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Make GtkHandleBox size request code use GtkStyleContext for padding
- Date: Tue, 4 Jan 2011 02:21:00 +0000 (UTC)
commit 7b3de2d5529c7902318130a5a23247b841c0c4b1
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Jan 4 02:35:19 2011 +0100
Make GtkHandleBox size request code use GtkStyleContext for padding
gtk/gtkhandlebox.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkhandlebox.c b/gtk/gtkhandlebox.c
index bb52492..c96f665 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]