[shotwell] Fix lined tags
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell] Fix lined tags
- Date: Sun, 6 May 2018 13:14:09 +0000 (UTC)
commit 031e9aba872ab99d4ec288408c3781e19586d79f
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 7a1eb4a..156ca72 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)
@@ -1258,6 +1263,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]