Bläddra i källkod

Added i_set_zoom command: set zoom to number prefix

master
Bert Münnich 13 år sedan
förälder
incheckning
4f5ce2e828
3 ändrade filer med 10 tillägg och 2 borttagningar
  1. +8
    -1
      commands.c
  2. +1
    -0
      commands.h
  3. +1
    -1
      config.def.h

+ 8
- 1
commands.c Visa fil

@@ -273,7 +273,14 @@ bool i_zoom(arg_t a) {
else if (scale < 0)
return img_zoom_out(&img);
else
return img_zoom(&img, 1.0);
return false;
}

bool i_set_zoom(arg_t a) {
if (mode == MODE_IMAGE)
return img_zoom(&img, (prefix ? prefix : (long) a) / 100.0);
else
return false;
}

bool i_fit_to_win(arg_t a) {


+ 1
- 0
commands.h Visa fil

@@ -56,6 +56,7 @@ bool i_pan_screen(arg_t);
bool i_pan_edge(arg_t);
bool i_drag(arg_t);
bool i_zoom(arg_t);
bool i_set_zoom(arg_t);
bool i_fit_to_win(arg_t);
bool i_fit_to_img(arg_t);
bool i_rotate(arg_t);


+ 1
- 1
config.def.h Visa fil

@@ -112,7 +112,7 @@ static const keymap_t keys[] = {
{ false, XK_KP_Add, i_zoom, (arg_t) +1 },
{ false, XK_minus, i_zoom, (arg_t) -1 },
{ false, XK_KP_Subtract, i_zoom, (arg_t) -1 },
{ false, XK_equal, i_zoom, (arg_t) None },
{ false, XK_equal, i_set_zoom, (arg_t) 100 },
{ false, XK_w, i_fit_to_win, (arg_t) None },
{ false, XK_W, i_fit_to_img, (arg_t) None },



Laddar…
Avbryt
Spara