diff options
author | Timm Bäder <mail@baedert.org> | 2017-12-04 12:42:52 +0100 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2017-12-04 12:42:52 +0100 |
commit | 93df23d9628efe20ea50fab0eb044f6e6e52e486 (patch) | |
tree | 2e1db15d6ab0e64fe4b2effc2c18b3a9a27745b3 /gtk/gtkviewport.c | |
parent | 1ed364a00067c76b5b0e581d82ab9597f28bbe62 (diff) | |
download | gtk+-93df23d9628efe20ea50fab0eb044f6e6e52e486.tar.gz |
Remove some more gtk_widget_get_content_size uses
Diffstat (limited to 'gtk/gtkviewport.c')
-rw-r--r-- | gtk/gtkviewport.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c index 03447593a6..2e8989d344 100644 --- a/gtk/gtkviewport.c +++ b/gtk/gtkviewport.c @@ -127,7 +127,8 @@ viewport_set_adjustment_values (GtkViewport *viewport, int viewport_size, other_viewport_size; int view_width, view_height; - gtk_widget_get_content_size (GTK_WIDGET (viewport), &view_width, &view_height); + view_width = gtk_widget_get_width (GTK_WIDGET (viewport)); + view_height = gtk_widget_get_height (GTK_WIDGET (viewport)); if (orientation == GTK_ORIENTATION_HORIZONTAL) { @@ -511,12 +512,12 @@ static void gtk_viewport_snapshot (GtkWidget *widget, GtkSnapshot *snapshot) { - int width, height; - - gtk_widget_get_content_size (widget, &width, &height); - gtk_snapshot_push_clip (snapshot, - &GRAPHENE_RECT_INIT(0, 0, width, height), "Viewport"); + &GRAPHENE_RECT_INIT( + 0, 0, + gtk_widget_get_width (widget), + gtk_widget_get_height (widget)), + "Viewport"); GTK_WIDGET_CLASS (gtk_viewport_parent_class)->snapshot (widget, snapshot); |