New commands: fit to the window's height/width

This commit is contained in:
baskerville
2012-07-19 12:28:44 +02:00
parent 5b6467913c
commit b56989f8fb
7 changed files with 30 additions and 6 deletions

View File

@ -310,9 +310,10 @@ bool i_set_zoom(arg_t a) {
bool i_fit_to_win(arg_t a) {
bool ret = false;
scalemode_t sm = (scalemode_t) a;
if (mode == MODE_IMAGE) {
if ((ret = img_fit_win(&img)))
if ((ret = img_fit_win(&img, sm)))
img_center(&img);
}
return ret;