diff options
author | Thomas White <taw@bitwiz.org.uk> | 2013-09-18 18:59:47 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2013-09-18 18:59:47 +0200 |
commit | 1cebe9cbdd309b79430e6275874e2011c733c46c (patch) | |
tree | d00f5b1b54e9a1940dd9c4200131dbd845c368fe | |
parent | 0c8741a9b259f4b91f2fb0f219d774267860e1c4 (diff) |
Take padding into account when fitting an image
-rw-r--r-- | src/wrap.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -636,12 +636,12 @@ static int get_size(const char *a, struct frame *fr, int *wp, int *hp) hs = strdup(x+1); if ( strcmp(ws, "fit") == 0 ) { - *wp = fr->w; + *wp = fr->w - (fr->lop.pad_l+fr->lop.pad_r); } else { *wp = strtoul(ws, NULL, 10); } if ( strcmp(ws, "fit") == 0 ) { - *hp = fr->h; + *hp = fr->h - (fr->lop.pad_t+fr->lop.pad_b); } else { *hp = strtoul(hs, NULL, 10); } |