From fbc9821d36139fb8739e4ca776a7f67a18f98c23 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Fri, 30 Jul 2021 14:17:10 +0200 Subject: [PATCH] wallpaper: use integers for aspect ratios --- bin/build-wallpaper | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/build-wallpaper b/bin/build-wallpaper index f9a7077..f6edb54 100755 --- a/bin/build-wallpaper +++ b/bin/build-wallpaper @@ -76,8 +76,8 @@ images = images[: len(screens)] # If more than one screen and one image has the right aspect ratio, # use it. if len(screens) > 1: - target = screen.width_in_pixels * 100 / screen.height_in_pixels - ratios = [image.size[0] * 100 / image.size[1] for image in images] + target = screen.width_in_pixels * 100 // screen.height_in_pixels + ratios = [image.size[0] * 100 // image.size[1] for image in images] try: index = ratios.index(target) images = [images[index]]