mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 13:08:00 +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 {
|
try {
|
||||||
var builder = Picasso.get()
|
var builder = Picasso.get()
|
||||||
.load(pathToLoad)
|
.load(pathToLoad)
|
||||||
.centerCrop()
|
|
||||||
.fit()
|
|
||||||
.stableKey(signature.toString())
|
.stableKey(signature.toString())
|
||||||
|
|
||||||
|
builder = if (cropThumbnails) {
|
||||||
|
builder.centerCrop().fit()
|
||||||
|
} else {
|
||||||
|
builder.centerInside()
|
||||||
|
}
|
||||||
|
|
||||||
if (roundCorners != ROUNDED_CORNERS_NONE) {
|
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 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()
|
val cornerRadius = resources.getDimension(cornerSize).toInt()
|
||||||
|
|
Loading…
Reference in a new issue