[gimp/gtk3-port: 121/233] app: port GimpContainerBox to GtkStyleContext
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 121/233] app: port GimpContainerBox to GtkStyleContext
- Date: Fri, 9 Sep 2016 21:18:15 +0000 (UTC)
commit ee24f5d4cc6c21c4e59f3d20b062aac7a9befaed
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 2cefc2c..c2d0d94 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]