summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2010-02-15 19:05:14 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2010-02-15 19:05:14 +0100
commit008acae35d56ec0c6241b7fd2e79a54d3c53c371 (patch)
treef26576013232d92b702e3e2f610e1f0d5ea29d18
parent614d327700eac46005b1cc39116d59eabd548070 (diff)
draw-actions: Correctly calculate line width → don't cut of stuff
-rw-r--r--src/imlib.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/imlib.c b/src/imlib.c
index d419539..a441ab0 100644
--- a/src/imlib.c
+++ b/src/imlib.c
@@ -1130,7 +1130,11 @@ void feh_draw_actions(winwidget w)
for (i = 0; i < 10; i++) {
if (opt.actions[i]) {
- gib_imlib_get_text_size(fn, opt.actions[i], NULL, &tw, &th, IMLIB_TEXT_TO_RIGHT);
+ line = emalloc(strlen(opt.actions[i]) + 5);
+ strcpy(line, "0: ");
+ line = strcat(line, opt.actions[i]);
+ gib_imlib_get_text_size(fn, line, NULL, &tw, &th, IMLIB_TEXT_TO_RIGHT);
+ free(line);
if (tw > max_tw)
max_tw = tw;
}