using preferredContentSize if exists