[gtk/wip/baedert/transforms6: 30/52] testsuite: Fix translate test for size_allocate changes



commit 1f1be208a487e1153fd8855310f85f874ca93255
Author: Timm Bäder <mail baedert org>
Date:   Sat Aug 18 09:35:52 2018 +0200

    testsuite: Fix translate test for size_allocate changes
    
    gtk_widget_set_transform is still a hack that will eventually go away
    but it's also still useful for testing.

 testsuite/gtk/translate.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/testsuite/gtk/translate.c b/testsuite/gtk/translate.c
index c09db8ef83..fa8679e61c 100644
--- a/testsuite/gtk/translate.c
+++ b/testsuite/gtk/translate.c
@@ -170,13 +170,14 @@ translate_with_parent (void)
 
 
   /* Now try a translation... */
-  graphene_matrix_init_translate (&transform,
-                                  &(graphene_point3d_t){20, 0, 0});
-  gtk_widget_set_transform (child, &transform);
   gtk_widget_set_margin_start (child, 0);
   gtk_widget_measure (child, GTK_ORIENTATION_HORIZONTAL, -1, NULL, NULL, NULL, NULL);
   gtk_widget_measure (parent, GTK_ORIENTATION_HORIZONTAL, -1, NULL, NULL, NULL, NULL);
   gtk_widget_size_allocate (parent, &(GtkAllocation){0, 0, WIDTH * 10, HEIGHT * 10}, -1);
+  graphene_matrix_init_translate (&transform,
+                                  &(graphene_point3d_t){20, 0, 0});
+  gtk_widget_set_transform (child, &transform);
+
   {
     double dx, dy;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]