Made popup menu change height depending on the items remaining