Removed fit-win-to-img command

This commit is contained in:
Bert Münnich 2014-02-04 22:38:24 +01:00
parent eb82519a80
commit 524d9de877
7 changed files with 5 additions and 65 deletions

View file

@ -149,10 +149,9 @@ of small previews is displayed, making it easy to choose an image to open.
{,} Decrease/increase gamma
Ctrl-g Reset gamma
s Toggle slideshow or set delay to [count] seconds
a Toggle anti-aliasing
W Resize window to fit image
s Toggle slideshow or set delay to [count] seconds
**Mouse button mappings:**

View file

@ -441,26 +441,6 @@ cmdreturn_t i_fit_to_win(arg_t a)
return CMD_INVALID;
}
cmdreturn_t i_fit_to_img(arg_t a)
{
int x, y;
unsigned int w, h;
cmdreturn_t ret = CMD_INVALID;
if (mode == MODE_IMAGE) {
x = MAX(0, win.x + img.x);
y = MAX(0, win.y + img.y);
w = img.w * img.zoom;
h = img.h * img.zoom;
if ((ret = win_moveresize(&win, x, y, w, h))) {
img.x = x - win.x;
img.y = y - win.y;
img.dirty = true;
}
}
return ret;
}
cmdreturn_t i_rotate(arg_t a)
{
degree_t degree = (degree_t) a;

View file

@ -70,7 +70,6 @@ cmdreturn_t i_drag(arg_t);
cmdreturn_t i_zoom(arg_t);
cmdreturn_t i_set_zoom(arg_t);
cmdreturn_t i_fit_to_win(arg_t);
cmdreturn_t i_fit_to_img(arg_t);
cmdreturn_t i_rotate(arg_t);
cmdreturn_t i_flip(arg_t);
cmdreturn_t i_slideshow(arg_t);

View file

@ -141,7 +141,6 @@ static const keymap_t keys[] = {
{ 0, XK_w, i_fit_to_win, (arg_t) SCALE_FIT },
{ 0, XK_e, i_fit_to_win, (arg_t) SCALE_WIDTH },
{ 0, XK_E, i_fit_to_win, (arg_t) SCALE_HEIGHT },
{ 0, XK_W, i_fit_to_img, (arg_t) None },
{ 0, XK_less, i_rotate, (arg_t) DEGREE_270 },
{ 0, XK_greater, i_rotate, (arg_t) DEGREE_90 },

9
sxiv.1
View file

@ -310,16 +310,13 @@ Increase gamma.
Reset gamma.
.SS Miscellaneous
.TP
.B a
Toggle anti-aliasing.
.TP
.B s
Toggle slideshow mode and/or set the delay between images to
.I count
seconds.
.TP
.B a
Toggle anti-aliasing.
.TP
.B W
Resize window to fit image.
.SH MOUSE COMMANDS
The following mouse mappings are available in image mode:
.SS Navigate image list

View file

@ -374,39 +374,6 @@ void win_expose(win_t *win, XExposeEvent *e)
e->x, e->y, e->width, e->height, e->x, e->y);
}
bool win_moveresize(win_t *win, int x, int y, unsigned int w, unsigned int h)
{
if (win == NULL || win->xwin == None)
return false;
/* caller knows nothing about the bar */
h += win->bar.h;
x = MAX(0, x);
y = MAX(0, y);
w = MIN(w, win->env.scrw - 2 * win->bw);
h = MIN(h, win->env.scrh - 2 * win->bw);
if (win->x == x && win->y == y && win->w == w && win->h + win->bar.h == h)
return false;
win->x = x;
win->y = y;
win->w = w;
win->h = h - win->bar.h;
win_update_sizehints(win);
XMoveResizeWindow(win->env.dpy, win->xwin, x, y, w, h);
if (win->pm != None) {
XFreePixmap(win->env.dpy, win->pm);
win->pm = None;
}
return true;
}
void win_toggle_fullscreen(win_t *win)
{
XEvent ev;

View file

@ -86,7 +86,6 @@ void win_close(win_t*);
bool win_configure(win_t*, XConfigureEvent*);
void win_expose(win_t*, XExposeEvent*);
bool win_moveresize(win_t*, int, int, unsigned int, unsigned int);
void win_toggle_fullscreen(win_t*);
void win_toggle_bar(win_t*);