[meld: 164/180] linkmap: Fix clipping calculations for offset textviews



commit 45dbc78880a800d1a4f59e2cf462dda3d9655d74
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sat Jul 4 07:26:24 2015 +1000

    linkmap: Fix clipping calculations for offset textviews
    
    This is relevant when one or both textviews have notification bars.

 meld/linkmap.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/meld/linkmap.py b/meld/linkmap.py
index 09e75a9..f8d7ce8 100644
--- a/meld/linkmap.py
+++ b/meld/linkmap.py
@@ -59,9 +59,11 @@ class LinkMap(Gtk.DrawingArea):
         pix_start = [t.get_visible_rect().y for t in self.views]
         y_offset = [t.translate_coordinates(self, 0, 0)[1] + 1 for t in self.views]
 
+        clip_y = min(y_offset) - 1
         clip_height = max(t.get_visible_rect().height for t in self.views) + 2
-        Gtk.render_frame(style, context, 0, 0, allocation.width, clip_height)
-        context.rectangle(0, -1, allocation.width, clip_height)
+        Gtk.render_frame(
+            style, context, 0, clip_y, allocation.width, clip_height)
+        context.rectangle(0, clip_y, allocation.width, clip_height)
         context.clip()
 
         height = allocation.height


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