only calculate row height with title text in mind

This commit is contained in:
Martin Rotter 2022-01-20 07:54:20 +01:00
parent e12acbc533
commit 01efdab258

View File

@ -429,7 +429,10 @@ QVariant MessagesModel::data(const QModelIndex& idx, int role) const {
}
case Qt::ItemDataRole::SizeHintRole: {
if (!m_multilineListItems || m_view == nullptr || m_view->isColumnHidden(idx.column())) {
if (!m_multilineListItems ||
m_view == nullptr ||
m_view->isColumnHidden(idx.column()) ||
idx.column() != MSG_DB_TITLE_INDEX) {
return {};
}
else {
@ -447,6 +450,8 @@ QVariant MessagesModel::data(const QModelIndex& idx, int role) const {
Qt::AlignmentFlag::AlignVCenter,
str).size();
//rct.setHeight(rct.height() + 20);
return rct;
}
}