mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 04:57:59 +01:00
crop picasso thumbnails only if set so in the app settings
This commit is contained in:
parent
15e7c72104
commit
2561c96c92
1 changed files with 6 additions and 2 deletions
|
@ -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…
Reference in a new issue