fix for the content size of a menu

now it computes the size when the items are aligned instead of using the entire window size as the menu content size.