ProjectExplorer: Don't cut off the summary label in the selector

Replace the manual height calculation with what Qt offers.

Task-number: QTCREATORBUG-16610
Change-Id: Icd18ef92d608d01c6343bb778343258d56461933
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
This commit is contained in:
Alessandro Portale
2016-07-15 16:30:46 +02:00
parent 7c910e8b16
commit 26246af9b3

View File

@@ -863,8 +863,7 @@ void MiniProjectTargetSelector::doLayout(bool keepSize)
visibleLineCount += m_listWidgets[i]->isVisibleTo(this) ? 0 : 1;
if (visibleLineCount == LAST) {
summaryLabelHeight = visibleLineCount * QFontMetrics(m_summaryLabel->font()).height()
+ m_summaryLabel->margin() *2;
summaryLabelHeight = m_summaryLabel->sizeHint().height();
onlySummary = true;
} else {
if (visibleLineCount < 3) {
@@ -872,8 +871,7 @@ void MiniProjectTargetSelector::doLayout(bool keepSize)
visibleLineCount = 3;
}
if (visibleLineCount)
summaryLabelHeight = visibleLineCount * QFontMetrics(m_summaryLabel->font()).height()
+ m_summaryLabel->margin() *2;
summaryLabelHeight = m_summaryLabel->sizeHint().height();
}
if (keepSize && oldSummaryLabelHeight > summaryLabelHeight)