[gtk+] viewport: Simplify child allocation



commit 23a1328fdaedf6891d5982e6c0fb8add44b21a99
Author: Timm Bäder <mail baedert org>
Date:   Mon Oct 30 17:47:59 2017 +0100

    viewport: Simplify child allocation
    
    allocation->x and allocation->y are always 0

 gtk/gtkviewport.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index 870f358..cb47726 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -526,8 +526,8 @@ gtk_viewport_size_allocate (GtkWidget           *widget,
     {
       GtkAllocation child_allocation, child_clip;
 
-      child_allocation.x = allocation->x - gtk_adjustment_get_value (hadjustment);
-      child_allocation.y = allocation->y - gtk_adjustment_get_value (vadjustment);
+      child_allocation.x = - gtk_adjustment_get_value (hadjustment);
+      child_allocation.y = - gtk_adjustment_get_value (vadjustment);
       child_allocation.width = gtk_adjustment_get_upper (hadjustment);
       child_allocation.height = gtk_adjustment_get_upper (vadjustment);
 


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