summaryrefslogtreecommitdiff
path: root/gtk/gtkscrolledwindow.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2017-08-14 12:12:09 +0200
committerTimm Bäder <mail@baedert.org>2017-08-14 12:22:39 +0200
commit5f859a1f24c153adf48467f60c4066201dbd8c61 (patch)
treec410d210d6b21628c7856fa2cb45971c57e1de3b /gtk/gtkscrolledwindow.c
parent9c7e089fc2eb9d3b1d459a5673eeb25230c0a46c (diff)
downloadgtk+-5f859a1f24c153adf48467f60c4066201dbd8c61.tar.gz
widget: Remove gtk_widget_get_content_allocation
Replace it where we still need something similar, e.g. in gtk_widget_translate_coordinates
Diffstat (limited to 'gtk/gtkscrolledwindow.c')
-rw-r--r--gtk/gtkscrolledwindow.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index f49c832ba5..2ab0e596bb 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -2881,7 +2881,7 @@ gtk_scrolled_window_relative_allocation (GtkWidget *widget,
GtkScrolledWindowPrivate *priv;
gint sb_width;
gint sb_height;
- GtkAllocation content_allocation;
+ int width, height;
g_return_if_fail (widget != NULL);
g_return_if_fail (allocation != NULL);
@@ -2895,12 +2895,12 @@ gtk_scrolled_window_relative_allocation (GtkWidget *widget,
gtk_widget_measure (priv->hscrollbar, GTK_ORIENTATION_VERTICAL, -1,
&sb_height, NULL, NULL, NULL);
- gtk_widget_get_content_allocation (widget, &content_allocation);
+ gtk_widget_get_content_size (widget, &width, &height);
- allocation->x = content_allocation.x;
- allocation->y = content_allocation.y;
- allocation->width = content_allocation.width;
- allocation->height = content_allocation.height;
+ allocation->x = 0;
+ allocation->y = 0;
+ allocation->width = width;
+ allocation->height = height;
/* Subtract some things from our available allocation size */
if (priv->vscrollbar_visible && !priv->use_indicators)
@@ -2917,7 +2917,7 @@ gtk_scrolled_window_relative_allocation (GtkWidget *widget,
priv->window_placement == GTK_CORNER_BOTTOM_LEFT)))
allocation->x += sb_width;
- allocation->width = MAX (1, content_allocation.width - sb_width);
+ allocation->width = MAX (1, width - sb_width);
}
if (priv->hscrollbar_visible && !priv->use_indicators)
@@ -2927,7 +2927,7 @@ gtk_scrolled_window_relative_allocation (GtkWidget *widget,
priv->window_placement == GTK_CORNER_BOTTOM_RIGHT)
allocation->y += (sb_height);
- allocation->height = MAX (1, content_allocation.height - sb_height);
+ allocation->height = MAX (1, height - sb_height);
}
}