Fix column size too narrow on resize

Instead of giving a value, just resize to the content size
This commit is contained in:
Chocobo1 2017-12-08 22:05:21 +08:00
parent 27cf98a962
commit c2c0dd2717
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
6 changed files with 6 additions and 18 deletions

View file

@ -180,10 +180,9 @@ void PeerListWidget::displayToggleColumnsMenu(const QPoint &)
Q_ASSERT(visibleCols > 0);
if (!isColumnHidden(col) && (visibleCols == 1))
return;
qDebug("Toggling column %d visibility", col);
setColumnHidden(col, !isColumnHidden(col));
if (!isColumnHidden(col) && (columnWidth(col) <= 5))
setColumnWidth(col, 100);
resizeColumnToContents(col);
saveSettings();
}
}