mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 21:33:27 -07:00
Persist size and treeview header state in preview dialog
- renamed variable m_headerState - renamed PreviewSelect class to PreviewSelectDialog - renamed previewselect files to previewselectdialog
This commit is contained in:
parent
ef63202be2
commit
3b4fd35dde
9 changed files with 84 additions and 40 deletions
|
@ -39,7 +39,7 @@
|
|||
#include <QApplication>
|
||||
#include "base/utils/misc.h"
|
||||
#include "base/utils/string.h"
|
||||
#include "previewselect.h"
|
||||
#include "previewselectdialog.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <QProxyStyle>
|
||||
|
@ -58,11 +58,11 @@ class PreviewListDelegate: public QItemDelegate {
|
|||
QStyleOptionViewItem opt = QItemDelegate::setOptions(index, option);
|
||||
|
||||
switch(index.column()) {
|
||||
case PreviewSelect::SIZE:
|
||||
case PreviewSelectDialog::SIZE:
|
||||
QItemDelegate::drawBackground(painter, opt, index);
|
||||
QItemDelegate::drawDisplay(painter, opt, option.rect, Utils::Misc::friendlyUnit(index.data().toLongLong()));
|
||||
break;
|
||||
case PreviewSelect::PROGRESS:{
|
||||
case PreviewSelectDialog::PROGRESS:{
|
||||
QStyleOptionProgressBar newopt;
|
||||
qreal progress = index.data().toDouble()*100.;
|
||||
newopt.rect = opt.rect;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue