forked from qt-creator/qt-creator
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user