diff --git a/gallery/build.properties b/gallery/build.properties index 2bc7272..580b8f9 100644 --- a/gallery/build.properties +++ b/gallery/build.properties @@ -1,8 +1,8 @@ #Created by .winboll/winboll_app_build.gradle -#Tue Apr 28 10:21:42 CST 2026 +#Tue Apr 28 10:32:14 CST 2026 stageCount=7 libraryProject= baseVersion=15.0 publishVersion=15.0.6 -buildCount=37 +buildCount=39 baseBetaVersion=15.0.7 diff --git a/gallery/src/main/java/cc/winboll/studio/gallery/CropCanvasView.java b/gallery/src/main/java/cc/winboll/studio/gallery/CropCanvasView.java index f49723c..92285c9 100644 --- a/gallery/src/main/java/cc/winboll/studio/gallery/CropCanvasView.java +++ b/gallery/src/main/java/cc/winboll/studio/gallery/CropCanvasView.java @@ -414,8 +414,15 @@ public class CropCanvasView extends View { newWidth = Math.max(minSize, Math.min(newWidth, canvasBounds.width())); newHeight = newWidth / coverRatio; - cropRect.set(centerX - newWidth / 2, centerY - newHeight / 2, - centerX + newWidth / 2, centerY + newHeight / 2); + float newLeft = centerX - newWidth / 2; + float newTop = centerY - newHeight / 2; + float newRight = centerX + newWidth / 2; + float newBottom = centerY + newHeight / 2; + + if (newLeft >= canvasBounds.left && newRight <= canvasBounds.right && + newTop >= canvasBounds.top && newBottom <= canvasBounds.bottom) { + cropRect.set(newLeft, newTop, newRight, newBottom); + } initialSpan = span; invalidate();