Commit 1d5efad3 authored by Abdo Roig-Maranges's avatar Abdo Roig-Maranges Committed by Sebastian Ramacher

add a config setting to prevent link_evaluate from changing scale

Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
parent f27769d1
......@@ -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);
......
......@@ -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);
}
......
......@@ -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
......
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