summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-09-25 22:35:31 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-09-25 22:35:31 (GMT)
commitc80ddbb8f5f79ab9b8074abbec968786c29e0d5d (patch)
tree195447238084fb90dbd306c1343156eabb48d2d5 /gui
parent02e648cdf7d30a1c77e101517cb9a2a03c3d92d7 (diff)
downloadeeshow-c80ddbb8f5f79ab9b8074abbec968786c29e0d5d.zip
eeshow-c80ddbb8f5f79ab9b8074abbec968786c29e0d5d.tar.gz
eeshow-c80ddbb8f5f79ab9b8074abbec968786c29e0d5d.tar.bz2
gui/inxex.c (thumb_hover): also show file name when hovering
Diffstat (limited to 'gui')
-rw-r--r--gui/index.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gui/index.c b/gui/index.c
index fce3133..a72ce21 100644
--- a/gui/index.c
+++ b/gui/index.c
@@ -154,16 +154,19 @@ static bool thumb_hover(void *user, bool on, int dx, int dy)
struct gui_sheet *sheet = user;
struct gui *gui = sheet->gui;
struct overlay_style style = overlay_style_default;
+ const char *file;
if (on) {
-
thumb_set_style(sheet, 1);
name_over = overlay_add(&gui->thumb_overlays, &gui->aois,
NULL, NULL, NULL);
+ file = sheet->sch->file;
if (sheet->sch && sheet->sch->title)
- overlay_text(name_over, "%s", sheet->sch->title);
+ overlay_text(name_over, "%s<small>%s%s</small>",
+ sheet->sch->title,
+ file ? "\n" : "", file ? file : "");
else
- overlay_text(name_over, "???");
+ overlay_text(name_over, "%s", file ? file : "");
style.font = BOLD_FONT_LARGE;
style.width = 1;
style.wmax = SHEET_MAX_NAME;