[shotwell/shotwell-0.28] Fix lined tags



commit 93d14085fc7deb433bc018e3a9927c1eb252a450
Author: Jens Georg <mail jensge org>
Date:   Sun May 6 15:11:31 2018 +0200

    Fix lined tags
    
    Fix regression introduced by a5ba963889c733d6ac80dad9a09058d0a214eb94

 src/CheckerboardLayout.vala |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/CheckerboardLayout.vala b/src/CheckerboardLayout.vala
index 0384d8e..0c52748 100644
--- a/src/CheckerboardLayout.vala
+++ b/src/CheckerboardLayout.vala
@@ -184,6 +184,11 @@ public abstract class CheckerboardItem : ThumbnailView {
             notify_view_altered();
         }
     }
+
+    public void translate_coordinates(ref int x, ref int y) {
+        x -= allocation.x + FRAME_WIDTH;
+        y -= allocation.y + FRAME_WIDTH;
+    }
     
     public void clear_title() {
         if (title == null)
@@ -1271,6 +1276,9 @@ public class CheckerboardLayout : Gtk.DrawingArea {
         Pango.Layout? layout = item.get_tag_list_layout();
         if (layout == null)
             return -1;
+
+        item.translate_coordinates(ref x, ref y);
+
         Gdk.Rectangle rect = item.get_subtitle_allocation();
         int index, trailing;
         int px = (x - rect.x) * Pango.SCALE;


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