mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-13 00:33:09 -07:00
Fix column size too narrow on resize
Instead of giving a value, just resize to the content size
This commit is contained in:
parent
27cf98a962
commit
c2c0dd2717
6 changed files with 6 additions and 18 deletions
|
@ -716,10 +716,9 @@ void TransferListWidget::displayDLHoSMenu(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();
|
||||
}
|
||||
}
|
||||
|
@ -1193,10 +1192,7 @@ void TransferListWidget::saveSettings()
|
|||
|
||||
bool TransferListWidget::loadSettings()
|
||||
{
|
||||
bool ok = header()->restoreState(Preferences::instance()->getTransHeaderState());
|
||||
if (!ok)
|
||||
header()->resizeSection(0, 200); // Default
|
||||
return ok;
|
||||
return header()->restoreState(Preferences::instance()->getTransHeaderState());
|
||||
}
|
||||
|
||||
void TransferListWidget::wheelEvent(QWheelEvent *event)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue