slightly better panning for gallery items

This commit is contained in:
lazysnake 2021-07-03 13:57:10 +02:00
parent dfc3a2263e
commit 81cd41ac9a

View File

@ -61,7 +61,10 @@ init python:
def addGalleryItem(imageName, ext, w, h, unlocked = False):
g.button(imageName)
g.image(imageName)
g.transform(Pan((w - 1920, h - 1080), (0, h - 1080), 30.0)) #TODO: niceify
horizontalPan = Pan((w - 1920, h - 1080), (0, h - 1080), 30.0)
verticalPan = Pan((w - 1920, h - 1080), (w - 1920, 0), 30.0)
g.transform(horizontalPan if w > h else verticalPan) #TODO: niceify
if unlocked:
g.unlock(imageName)