Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
pwmt
zathura
Commits
bdceb153
Commit
bdceb153
authored
Feb 26, 2016
by
Sebastian Ramacher
Browse files
Switch to multiplicative zooming (fixes #614)
Signed-off-by:
Sebastian Ramacher
<
sebastian+dev@ramacher.at
>
parent
771e0513
Changes
1
Show whitespace changes
Inline
Side-by-side
zathura/shortcuts.c
View file @
bdceb153
...
...
@@ -1363,14 +1363,14 @@ sc_zoom(girara_session_t* session, girara_argument_t* argument, girara_event_t*
girara_setting_get
(
zathura
->
ui
.
session
,
"zoom-step"
,
&
value
);
const
int
nt
=
(
t
==
0
)
?
1
:
t
;
const
double
zoom_step
=
value
/
100
.
0
*
nt
;
const
double
zoom_step
=
1
.
0
+
value
/
100
.
0
*
nt
;
const
double
old_zoom
=
zathura_document_get_scale
(
zathura
->
document
);
/* specify new zoom value */
if
(
argument
->
n
==
ZOOM_IN
)
{
zathura_document_set_scale
(
zathura
->
document
,
old_zoom
+
zoom_step
);
zathura_document_set_scale
(
zathura
->
document
,
old_zoom
*
zoom_step
);
}
else
if
(
argument
->
n
==
ZOOM_OUT
)
{
zathura_document_set_scale
(
zathura
->
document
,
old_zoom
-
zoom_step
);
zathura_document_set_scale
(
zathura
->
document
,
old_zoom
/
zoom_step
);
}
else
if
(
argument
->
n
==
ZOOM_SPECIFIC
)
{
if
(
t
==
0
)
{
zathura_document_set_scale
(
zathura
->
document
,
1
.
0
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment