Commit 49aa4195 authored by Sebastian Ramacher's avatar Sebastian Ramacher
parent 3d496848
......@@ -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;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment