mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-07-06 00:04:20 +02:00
wallpaper: use integers for aspect ratios
This commit is contained in:
parent
1c9a2b1272
commit
fbc9821d36
1 changed files with 2 additions and 2 deletions
|
@ -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]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue