Skip to content

Commit

Permalink
Fix image scaling when the display scale changes (#2475)
Browse files Browse the repository at this point in the history
  • Loading branch information
gpeal committed Mar 4, 2024
1 parent 4530351 commit 7340d68
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -219,13 +219,13 @@ public boolean hasImages() {
public Map<String, LottieImageAsset> getImages() {
float dpScale = Utils.dpScale();
if (dpScale != imagesDpScale) {
imagesDpScale = dpScale;
Set<Map.Entry<String, LottieImageAsset>> entries = images.entrySet();

for (Map.Entry<String, LottieImageAsset> entry : entries) {
images.put(entry.getKey(), entry.getValue().copyWithScale(imagesDpScale / dpScale));
}
}
imagesDpScale = dpScale;
return images;
}

Expand Down

0 comments on commit 7340d68

Please sign in to comment.