Ver código fonte

Align big images on top-left corner

master
Bert 14 anos atrás
pai
commit
5a35484e71
2 arquivos alterados com 9 adições e 2 exclusões
  1. +1
    -1
      Makefile
  2. +8
    -1
      image.c

+ 1
- 1
Makefile Ver arquivo

@@ -1,6 +1,6 @@
all: sxiv

VERSION=git-20110225
VERSION=git-20110226

CC?=gcc
PREFIX?=/usr/local


+ 8
- 1
image.c Ver arquivo

@@ -162,7 +162,14 @@ void img_render(img_t *img, win_t *win) {
if (!img->re) {
/* rendered for the first time */
img->re = 1;
img_center(img, win);
if (img->zoom * img->w <= win->w)
img->x = (win->w - img->w * img->zoom) / 2;
else
img->x = 0;
if (img->zoom * img->h <= win->h)
img->y = (win->h - img->h * img->zoom) / 2;
else
img->y = 0;
}
if (img->checkpan) {


Carregando…
Cancelar
Salvar