mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-11 04:43:48 +01:00
CS
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
2c76fde31f
commit
6ee0f265a3
13
shortcuts.c
13
shortcuts.c
@ -495,13 +495,16 @@ sc_scroll(girara_session_t* session, girara_argument_t* argument,
|
||||
t = 1;
|
||||
}
|
||||
|
||||
unsigned int view_width=0, view_height=0;
|
||||
unsigned int view_width = 0;
|
||||
unsigned int view_height = 0;
|
||||
zathura_document_get_viewport_size(zathura->document, &view_height, &view_width);
|
||||
|
||||
unsigned int cell_width=0, cell_height=0;
|
||||
unsigned int cell_width = 0;
|
||||
unsigned int cell_height = 0;
|
||||
zathura_document_get_cell_size(zathura->document, &cell_height, &cell_width);
|
||||
|
||||
unsigned int doc_width=0, doc_height=0;
|
||||
unsigned int doc_width = 0;
|
||||
unsigned int doc_height = 0;
|
||||
zathura_document_get_document_size(zathura->document, &doc_height, &doc_width);
|
||||
|
||||
float scroll_step = 40;
|
||||
@ -544,8 +547,8 @@ sc_scroll(girara_session_t* session, girara_argument_t* argument,
|
||||
direction = 1.0;
|
||||
}
|
||||
|
||||
double vstep = (double)(cell_height + padding) / (double)doc_height;
|
||||
double hstep = (double)(cell_width + padding) / (double)doc_width;
|
||||
const double vstep = (double)(cell_height + padding) / (double)doc_height;
|
||||
const double hstep = (double)(cell_width + padding) / (double)doc_width;
|
||||
|
||||
/* compute new position */
|
||||
switch(argument->n) {
|
||||
|
Loading…
Reference in New Issue
Block a user