Browse Source

Make sure status filters height is correct when the visual style changes

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
de4f0272c1
  1. 24
      src/transferlistfilterswidget.h

24
src/transferlistfilterswidget.h

@ -144,12 +144,32 @@ protected: @@ -144,12 +144,32 @@ protected:
}
};
class StatusFiltersWidget : public QListWidget {
public:
StatusFiltersWidget(QWidget *parent) : QListWidget(parent) {
setFixedHeight(100);
}
protected:
void changeEvent(QEvent *e) {
QListWidget::changeEvent(e);
switch (e->type()) {
case QEvent::StyleChange:
setSpacing(0);
setFixedHeight(100);
break;
default:
break;
}
}
};
class TransferListFiltersWidget: public QFrame {
Q_OBJECT
private:
QHash<QString, int> customLabels;
QListWidget* statusFilters;
StatusFiltersWidget* statusFilters;
LabelFiltersList* labelFilters;
QVBoxLayout* vLayout;
TransferListWidget *transferList;
@ -160,7 +180,7 @@ public: @@ -160,7 +180,7 @@ public:
TransferListFiltersWidget(QWidget *parent, TransferListWidget *transferList): QFrame(parent), transferList(transferList), nb_labeled(0), nb_torrents(0) {
// Construct lists
vLayout = new QVBoxLayout();
statusFilters = new QListWidget(this);
statusFilters = new StatusFiltersWidget(this);
vLayout->addWidget(statusFilters);
labelFilters = new LabelFiltersList(this);
vLayout->addWidget(labelFilters);

Loading…
Cancel
Save