mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-10 16:53:46 +01:00
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:
parent
f27769d1b7
commit
1d5efad36a
2
config.c
2
config.c
@ -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);
|
||||
|
5
links.c
5
links.c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user