Fixed high-res images having blurry/low-res applied wallpapers
Updated dependencies Updated localization
This commit is contained in:
1 parent
4e5f0d63cc
commit
4f7129f5f4
43 files changed
+151
-191
No files matched your search
+1
-1
@@ -532,7 +532,7 @@ class WallpaperService1: Service() {
|
||||
val imageSize = wallpaper.getImageDimensions(context) ?: return false
|
||||
val aspectRatio = imageSize.height.toFloat() / imageSize.width.toFloat()
|
||||
val device = context.resources.displayMetrics
|
||||
val targetWidth = min(device.widthPixels, imageSize.width)
|
||||
val targetWidth = min(3 * device.widthPixels, imageSize.width)
|
||||
val targetHeight = (targetWidth * aspectRatio).toInt()
|
||||
|
||||
val bitmap = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
|
||||
+1
-1
@@ -519,7 +519,7 @@ class WallpaperService2: Service() {
|
||||
val aspectRatio = imageSize.height.toFloat() / imageSize.width.toFloat()
|
||||
val device = context.resources.displayMetrics
|
||||
val targetWidth = min(device.widthPixels, imageSize.width)
|
||||
val targetHeight = (targetWidth * aspectRatio).toInt()
|
||||
val targetHeight = (3 * targetWidth * aspectRatio).toInt()
|
||||
|
||||
val bitmap = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user