take a look at this modified gallery.rpy file.
https://drive.google.com/file/d/16N1JB6ZAuR5J_HJ6h3Ciahr51tk7eWuG/view?usp=shari...
in testing I reduced the size of the gallery thumbnails to 288x162 and put a frame around the thumbnails and buttons to shrink it
I tested with a 1280x720 gui so you may have to adjust the size of the grid and the thumbnails / lock image to find a good fit for your gui size