From 5155c9a33d549c52463bd7e2a93481fd73a43c64 Mon Sep 17 00:00:00 2001 From: ViAnh Date: Fri, 5 Sep 2025 16:05:04 +0700 Subject: [PATCH] Reduce gaps between webtoon pages --- .../kotatsu/reader/ui/pager/webtoon/WebtoonImageView.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/org/koitharu/kotatsu/reader/ui/pager/webtoon/WebtoonImageView.kt b/app/src/main/kotlin/org/koitharu/kotatsu/reader/ui/pager/webtoon/WebtoonImageView.kt index 3b3dbba56..cd26a83f7 100644 --- a/app/src/main/kotlin/org/koitharu/kotatsu/reader/ui/pager/webtoon/WebtoonImageView.kt +++ b/app/src/main/kotlin/org/koitharu/kotatsu/reader/ui/pager/webtoon/WebtoonImageView.kt @@ -86,9 +86,9 @@ class WebtoonImageView @JvmOverloads constructor( desiredWidth = sWidth desiredHeight = sHeight } else if (resizeHeight) { - desiredHeight = (sHeight.toDouble() / sWidth.toDouble() * desiredWidth).roundToInt() + desiredHeight = (sHeight.toDouble() / sWidth.toDouble() * desiredWidth).toInt() } else if (resizeWidth) { - desiredWidth = (sWidth.toDouble() / sHeight.toDouble() * desiredHeight).roundToInt() + desiredWidth = (sWidth.toDouble() / sHeight.toDouble() * desiredHeight).toInt() } } desiredWidth = desiredWidth.coerceAtLeast(suggestedMinimumWidth)