GUI: elide label: unify sizeHint & minimumSizeHint functions

This commit is contained in:
Moritz Bunkus 2020-09-22 11:38:07 +02:00
parent 000a17844c
commit f303046445
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85

View File

@ -93,11 +93,7 @@ ElideLabel::sizeHint()
QSize QSize
ElideLabel::minimumSizeHint() ElideLabel::minimumSizeHint()
const { const {
if (Qt::ElideNone == p_func()->m_elideMode) return sizeHint();
return sizeHint();
auto metrics = fontMetrics();
return QSize{ Util::horizontalAdvance(metrics, Q("")), metrics.height() };
} }
void void