Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
Sebastian Ramacher 2017-02-23 18:50:12 +01:00
parent 3d49684860
commit 49aa419568

View file

@ -1380,13 +1380,13 @@ position_set(zathura_t* zathura, double position_x, double position_y)
}
double comppos_x, comppos_y;
unsigned int page_id = zathura_document_get_current_page_number(zathura->document);
const unsigned int page_id = zathura_document_get_current_page_number(zathura->document);
bool vertical_center = false;
girara_setting_get(zathura->ui.session, "vertical-center", &vertical_center);
/* xalign = 0.5: center horizontally (with the page, not the document) */
if (vertical_center) {
if (vertical_center == true) {
/* yalign = 0.0: align page an viewport edges at the top */
page_number_to_position(zathura->document, page_id, 0.5, 0.0, &comppos_x, &comppos_y);
} else {
@ -1406,7 +1406,7 @@ position_set(zathura_t* zathura, double position_x, double position_y)
/* center horizontally */
if (adjust_mode == ZATHURA_ADJUST_BESTFIT ||
adjust_mode == ZATHURA_ADJUST_WIDTH ||
zoom_center) {
zoom_center == true) {
position_x = 0.5;
}
}