Reduce gaps between webtoon pages

This commit is contained in:
ViAnh
2025-09-05 16:05:04 +07:00
committed by Koitharu
parent f7a461a9d8
commit 5155c9a33d

View File

@@ -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)