Arranging filter buttons in a grid layout