mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-01 07:26:01 +01:00
Update sc_adjust_window
This commit is contained in:
parent
2b7c13c905
commit
4868bcec55
1 changed files with 6 additions and 7 deletions
13
shortcuts.c
13
shortcuts.c
|
@ -128,20 +128,19 @@ sc_adjust_window(girara_session_t* session, girara_argument_t* argument,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ZATHURA_ADJUST_BESTFIT:
|
case ZATHURA_ADJUST_BESTFIT:
|
||||||
if (total_width < total_height) {
|
if (rotation == 0 || rotation == 180) {
|
||||||
if (rotation == 0 || rotation == 180) {
|
if (width < height) {
|
||||||
zathura_document_set_scale(zathura->document, height / max_height);
|
zathura_document_set_scale(zathura->document, width / total_width);
|
||||||
} else {
|
} else {
|
||||||
zathura_document_set_scale(zathura->document, width / total_height);
|
zathura_document_set_scale(zathura->document, height / total_height);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (rotation == 0 || rotation == 180) {
|
if (width < height) {
|
||||||
zathura_document_set_scale(zathura->document, width / total_width);
|
zathura_document_set_scale(zathura->document, width / total_height);
|
||||||
} else {
|
} else {
|
||||||
zathura_document_set_scale(zathura->document, height / total_width);
|
zathura_document_set_scale(zathura->document, height / total_width);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
goto error_ret;
|
goto error_ret;
|
||||||
|
|
Loading…
Reference in a new issue