Tiled Gallery: Fix square/circle display bug.

Square and circle galleries were not displayed properly. Fixed layout
computation.