[gtk/wip/otte/transform: 28/37] treeview: Use new snapshot transforms
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/transform: 28/37] treeview: Use new snapshot transforms
- Date: Thu, 21 Feb 2019 06:23:11 +0000 (UTC)
commit 79d518b753339065ce809ea2312558da8881c011
Author: Benjamin Otte <otte redhat com>
Date: Thu Feb 21 05:34:12 2019 +0100
treeview: Use new snapshot transforms
gtk/gtktreeview.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 9e838c2319..b9ec23b274 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -4925,13 +4925,12 @@ gtk_tree_view_snapshot (GtkWidget *widget,
height - gtk_tree_view_get_effective_header_height (tree_view)
));
- gtk_snapshot_offset (snapshot,
- - (gint) gtk_adjustment_get_value (tree_view->priv->hadjustment),
- gtk_tree_view_get_effective_header_height (tree_view));
+ gtk_snapshot_save (snapshot);
+ gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (
+ - (gint) gtk_adjustment_get_value (tree_view->priv->hadjustment),
+ gtk_tree_view_get_effective_header_height (tree_view)));
gtk_tree_view_bin_snapshot (widget, snapshot);
- gtk_snapshot_offset (snapshot,
- (gint) gtk_adjustment_get_value (tree_view->priv->hadjustment),
- - gtk_tree_view_get_effective_header_height (tree_view));
+ gtk_snapshot_restore (snapshot);
/* We can't just chain up to Container::draw as it will try to send the
* event to the headers, so we handle propagating it to our children
@@ -9386,10 +9385,11 @@ gtk_tree_view_snapshot_arrow (GtkTreeView *tree_view,
gtk_style_context_set_state (context, state);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_EXPANDER);
- gtk_snapshot_offset (snapshot, area.x, area.y);
+ gtk_snapshot_save (snapshot);
+ gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (area.x, area.y));
gtk_css_style_snapshot_icon (gtk_style_context_lookup_style (context), snapshot,
area.width, area.height, image_type);
- gtk_snapshot_offset (snapshot, -area.x, -area.y);
+ gtk_snapshot_restore (snapshot);
gtk_style_context_restore (context);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]