fix gallery layout for ipad