The width of the vertical scrollbar (if there is one) needs to be
substracted from the width of the GtkScrolledWindow in order to obtain
the correct dimensions of the view area.
See issue 27 <http://bugs.pwmt.org/issue27>.
It also deals better with documents where pages don't all have the same
size.
Reported-by: Andreas Weinlich <business@weinlich.org>
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
zathura_get_document_size computes the size of the document to be
displayed (in pixels), given the size of the individual cells. It takes
padding between the cells into account.
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
A document is laid out on a homogeneous gtk table/grid. This new method,
zathura_document_get_cell_size, computes the size of the cells in that
table/grid, at the current scale.
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
Initializing page_rect makes Valgrind happy; it was complaining before,
even though all the values were properly initialized, but it's more
obvious this way.
Initialize the other two structs in the same way for consitency.
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
"focus_inputbar" and "toggle_page_mode" were defined in code but not
declared as shortcut functions (and thus could not be mapped to
different keys by the user using "map").
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
Also alphabetize the shortcut functions declarations in code, to make it
easier to keep the documentation and code in sync.
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This is useful when the text of the link doesn't match its target. The
default key is set to 'F'.
See issue 266 <http://bugs.pwmt.org/issue266>.
Reported-by: Iron <o380770@rtrtr.com>
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
The scroll-wrap option used to only change the behavior of 'J' and 'K'
(i.e. moving one page forward/backward).
Now, if scroll-wrap is true and the top of the first page is shown,
pressing 'k' will show the bottom of the last page; conversely, when at
the bottom of the last page, pressing 'j' will show the top of the first
page.
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
When set to true, it used to _not_ wrap around the begining/end. Now it
wraps if set to true, and it doesn't if set to false.
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
Both in the documentation and in function names, "synctex" was sometimes
spelled "syntex" or "syntec".
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
No matter what the value of n was, the "n=" shortcut would set the zoom
value to 100%. It is now set to n% instead.
See issue #273 <http://bugs.pwmt.org/issue273>.
Reported-by: Kamil Smardzewski <roderyk197@gmail.com>
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This is a temporary workaround because of issues in the poppler plugin. We
really need to introduce locking in the poppler plugin and remove the render
locks agains.
Closes: #253