Commit 26246af9 authored by Alessandro Portale's avatar Alessandro Portale

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: default avatarThomas Hartmann <Thomas.Hartmann@theqtcompany.com>
parent 7c910e8b
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment