mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-02-16 20:10:37 +01:00
crop picasso thumbnails only if set so in the app settings
This commit is contained in:
parent
15e7c72104
commit
2561c96c92
@ -502,10 +502,14 @@ fun Context.tryLoadingWithPicasso(path: String, view: MySquareImageView, cropThu
|
||||
try {
|
||||
var builder = Picasso.get()
|
||||
.load(pathToLoad)
|
||||
.centerCrop()
|
||||
.fit()
|
||||
.stableKey(signature.toString())
|
||||
|
||||
builder = if (cropThumbnails) {
|
||||
builder.centerCrop().fit()
|
||||
} else {
|
||||
builder.centerInside()
|
||||
}
|
||||
|
||||
if (roundCorners != ROUNDED_CORNERS_NONE) {
|
||||
val cornerSize = if (roundCorners == ROUNDED_CORNERS_SMALL) R.dimen.rounded_corner_radius_small else R.dimen.rounded_corner_radius_big
|
||||
val cornerRadius = resources.getDimension(cornerSize).toInt()
|
||||
|
Loading…
x
Reference in New Issue
Block a user