add a config setting to prevent link_evaluate from changing scale

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
Abdo Roig-Maranges 2013-10-21 18:01:04 +02:00 committed by Sebastian Ramacher
parent f27769d1b7
commit 1d5efad36a
3 changed files with 13 additions and 1 deletions

View File

@ -199,6 +199,8 @@ config_load_default(zathura_t* zathura)
bool_value = true;
girara_setting_add(gsession, "link-hadjust", &bool_value, BOOLEAN, false, _("Align link target to the left"), NULL, NULL);
bool_value = true;
girara_setting_add(gsession, "link-zoom", &bool_value, BOOLEAN, false, _("Let zoom be changed when following links"), NULL, NULL);
bool_value = true;
girara_setting_add(gsession, "search-hadjust", &bool_value, BOOLEAN, false, _("Center result horizontally"), NULL, NULL);
float_value = 0.5;
girara_setting_add(gsession, "highlight-transparency", &float_value, FLOAT, false, _("Transparency for highlighting"), NULL, NULL);

View File

@ -122,10 +122,13 @@ zathura_link_evaluate(zathura_t* zathura, zathura_link_t* link)
return;
}
bool link_zoom = true;
girara_setting_get(zathura->ui.session, "link-zoom", &link_zoom);
switch (link->type) {
case ZATHURA_LINK_GOTO_DEST:
if (link->target.destination_type != ZATHURA_LINK_DESTINATION_UNKNOWN) {
if (link->target.scale != 0) {
if (link->target.scale != 0 && link_zoom) {
zathura_document_set_scale(zathura->document, link->target.scale);
}

View File

@ -690,6 +690,13 @@ Defines if scrolling by half or full pages stops at page boundaries.
* Value type: Boolean
* Default value: false
link-zoom
^^^^^^^^^
En/Disables the hability of changing zoom when following links.
* Value type: Boolean
* Default value: true
link-hadjust
^^^^^^^^^^^^
En/Disables aligning to the left internal link targets, for example from the index