mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 15:56:00 +01:00
Simplify
This commit is contained in:
parent
30f5779828
commit
1bf887edc5
1 changed files with 8 additions and 9 deletions
|
@ -421,16 +421,15 @@ zathura_document_set_rotation(zathura_document_t* document, unsigned int rotatio
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
document->rotate = rotation % 360;
|
rotation = rotation % 360;
|
||||||
|
if (rotation == 0 || rotation > 270) {
|
||||||
if (document->rotate > 0 && document->rotate <= 90) {
|
|
||||||
document->rotate = 90;
|
|
||||||
} else if (document->rotate > 0 && document->rotate <= 180) {
|
|
||||||
document->rotate = 180;
|
|
||||||
} else if (document->rotate > 0 && document->rotate <= 270) {
|
|
||||||
document->rotate = 270;
|
|
||||||
} else {
|
|
||||||
document->rotate = 0;
|
document->rotate = 0;
|
||||||
|
} else if (rotation <= 90) {
|
||||||
|
document->rotate = 90;
|
||||||
|
} else if (rotation <= 180) {
|
||||||
|
document->rotate = 180;
|
||||||
|
} else {
|
||||||
|
document->rotate = 270;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue