mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-23 01:14:04 +02:00
eeshow/: work around the ink_rect.y bug more elegantly
Still have no clue what causes this.
This commit is contained in:
parent
51f6852bf9
commit
cb4ee6d5b9
@ -154,7 +154,19 @@ fprintf(stderr, "%d + %d %d + %d\n",
|
|||||||
#if 0
|
#if 0
|
||||||
fprintf(stderr, "%u(%d) %u %.60s\n", ty, ink_rect.y / PANGO_SCALE, ink_h, over->s);
|
fprintf(stderr, "%u(%d) %u %.60s\n", ty, ink_rect.y / PANGO_SCALE, ink_h, over->s);
|
||||||
#endif
|
#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);
|
cairo_clip(cr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -323,19 +323,12 @@ static void show_history(struct gui_ctx *ctx)
|
|||||||
|
|
||||||
overlay_remove_all(&ctx->vcs_overlays);
|
overlay_remove_all(&ctx->vcs_overlays);
|
||||||
for (h = ctx->hist; h; h = h->next) {
|
for (h = ctx->hist; h; h = h->next) {
|
||||||
// @@@ \n doesn't work with cairo_show_text :-(
|
|
||||||
over = overlay_add(&ctx->vcs_overlays, &ctx->aois,
|
over = overlay_add(&ctx->vcs_overlays, &ctx->aois,
|
||||||
NULL, click_history, h);
|
NULL, click_history, h);
|
||||||
overlay_text(over, "<small>%s</small>",
|
overlay_text(over, "<small>%s</small>",
|
||||||
vcs_git_summary(h->hist));
|
vcs_git_summary(h->hist));
|
||||||
overlay_style(over,
|
overlay_style(over,
|
||||||
/*
|
h == ctx->curr_hist ? &style_dense_selected :
|
||||||
* @@@ for some mysterious reason, we get 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.
|
|
||||||
*/
|
|
||||||
h == ctx->curr_hist ? &overlay_style_dense_selected :
|
|
||||||
&style_dense);
|
&style_dense);
|
||||||
}
|
}
|
||||||
redraw(ctx);
|
redraw(ctx);
|
||||||
|
Loading…
Reference in New Issue
Block a user