summaryrefslogtreecommitdiff
path: root/gui-over.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-06 23:01:51 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-06 23:02:42 -0300
commite2edb7be235a8ba99085e577e0c3fbb37898fc1d (patch)
tree836db1ed195b7147c1fde7710764a69782589268 /gui-over.c
parent28cbd0430fa6f8d3b415f2bd109db19243d5496f (diff)
downloadeeshow-e2edb7be235a8ba99085e577e0c3fbb37898fc1d.tar.gz
eeshow-e2edb7be235a8ba99085e577e0c3fbb37898fc1d.tar.bz2
eeshow-e2edb7be235a8ba99085e577e0c3fbb37898fc1d.zip
eeshow/: work around the ink_rect.y bug more elegantly
Still have no clue what causes this.
Diffstat (limited to 'gui-over.c')
-rw-r--r--gui-over.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/gui-over.c b/gui-over.c
index ba9955f..de664dc 100644
--- a/gui-over.c
+++ b/gui-over.c
@@ -154,7 +154,19 @@ fprintf(stderr, "%d + %d %d + %d\n",
#if 0
fprintf(stderr, "%u(%d) %u %.60s\n", ty, ink_rect.y / PANGO_SCALE, ink_h, over->s);
#endif
- cairo_rectangle(cr, tx, ty, ink_w, ink_h);
+/*
+ * @@@ for some mysterious reason, we get
+ * ink_h = ink_rect.height / PANGO_SCALE = 5
+ * instead of 2 if using overlay_style_dense_selected. Strangely, changing
+ * overlay_style_dense_selected such that it becomes more like
+ * overlay_style_dense has no effect.
+ *
+ * This causes the text to be cut vertically, roughly in the middle. We hack
+ * around this problem by growind the clipping area vertically. This works,
+ * since we're currently only concerned about horizontal clipping anyway.
+ */
+
+ cairo_rectangle(cr, tx, ty, ink_w, ink_h + 20);
cairo_clip(cr);
}