[gimp/gtk3-port: 143/236] app: port GimpContainerBox to GtkStyleContext
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 143/236] app: port GimpContainerBox to GtkStyleContext
- Date: Wed, 27 Jul 2011 19:00:33 +0000 (UTC)
commit a5f3a0e70a0ef7617bc1a2339ff5eb8bcae6b990
Author: Michael Natterer <mitch gimp org>
Date: Sun Dec 19 14:23:16 2010 +0100
app: port GimpContainerBox to GtkStyleContext
app/widgets/gimpcontainerbox.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/app/widgets/gimpcontainerbox.c b/app/widgets/gimpcontainerbox.c
index 8b4a6eb..82ee009 100644
--- a/app/widgets/gimpcontainerbox.c
+++ b/app/widgets/gimpcontainerbox.c
@@ -131,9 +131,10 @@ gimp_container_box_set_size_request (GimpContainerBox *box,
{
GimpContainerView *view;
GtkScrolledWindowClass *sw_class;
- GtkStyle *sw_style;
+ GtkStyleContext *sw_style;
GtkWidget *sb;
GtkRequisition req;
+ GtkBorder border;
gint view_size;
gint scrollbar_width;
gint border_x;
@@ -164,10 +165,12 @@ gimp_container_box_set_size_request (GimpContainerBox *box,
border_x = border_y = gtk_container_get_border_width (GTK_CONTAINER (box));
- sw_style = gtk_widget_get_style (box->scrolled_win);
+ sw_style = gtk_widget_get_style_context (box->scrolled_win);
- border_x += sw_style->xthickness * 2 + scrollbar_width;
- border_y += sw_style->ythickness * 2;
+ gtk_style_context_get_border (sw_style, 0, &border);
+
+ border_x += border.left + border.right + scrollbar_width;
+ border_y += border.top + border.bottom;
gtk_widget_set_size_request (box->scrolled_win,
width > 0 ? width + border_x : -1,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]