mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07:00
Fix style of left panel
This commit is contained in:
parent
8846f52ce1
commit
de228fe074
2 changed files with 16 additions and 1 deletions
|
@ -2,6 +2,7 @@
|
||||||
- BUGFIX: More reliable RSS feed parsing (closes #1001777)
|
- BUGFIX: More reliable RSS feed parsing (closes #1001777)
|
||||||
- BUGFIX: Better support for cookies in RSS
|
- BUGFIX: Better support for cookies in RSS
|
||||||
- BUGFIX: Make sure show/hide text in tray icon menu is correct
|
- BUGFIX: Make sure show/hide text in tray icon menu is correct
|
||||||
|
- COSMETIC: Improve style of left panel
|
||||||
|
|
||||||
* Sat May 5 2012 - Christophe Dumez <chris@qbittorrent.org> - v2.9.8
|
* Sat May 5 2012 - Christophe Dumez <chris@qbittorrent.org> - v2.9.8
|
||||||
- BUGFIX: Various UI style fixes
|
- BUGFIX: Various UI style fixes
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
#include <QStandardItemModel>
|
#include <QStandardItemModel>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
|
#include <QLabel>
|
||||||
|
|
||||||
#include "transferlistdelegate.h"
|
#include "transferlistdelegate.h"
|
||||||
#include "transferlistwidget.h"
|
#include "transferlistwidget.h"
|
||||||
|
@ -62,6 +63,7 @@ public:
|
||||||
// Accept drop
|
// Accept drop
|
||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
|
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
|
||||||
|
setStyleSheet("QListWidget { background: transparent; border: 0 }");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Redefine addItem() to make sure the list stays sorted
|
// Redefine addItem() to make sure the list stays sorted
|
||||||
|
@ -158,13 +160,14 @@ public:
|
||||||
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
// Height is fixed (sizeHint().height() is used)
|
// Height is fixed (sizeHint().height() is used)
|
||||||
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
|
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
|
||||||
|
setStyleSheet("QListWidget { background: transparent; border: 0 }");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QSize sizeHint() const {
|
QSize sizeHint() const {
|
||||||
QSize size = QListWidget::sizeHint();
|
QSize size = QListWidget::sizeHint();
|
||||||
// Height should be exactly the height of the content
|
// Height should be exactly the height of the content
|
||||||
size.setHeight(contentsSize().height() + 2 * frameWidth());
|
size.setHeight(contentsSize().height() + 2 * frameWidth() + 6);
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,9 +193,20 @@ public:
|
||||||
// Construct lists
|
// Construct lists
|
||||||
vLayout = new QVBoxLayout();
|
vLayout = new QVBoxLayout();
|
||||||
vLayout->setContentsMargins(0, 4, 0, 4);
|
vLayout->setContentsMargins(0, 4, 0, 4);
|
||||||
|
QFont font;
|
||||||
|
font.setBold(true);
|
||||||
|
font.setCapitalization(QFont::SmallCaps);
|
||||||
|
QLabel *torrentsLabel = new QLabel(tr("Torrents"));
|
||||||
|
torrentsLabel->setIndent(2);
|
||||||
|
torrentsLabel->setFont(font);
|
||||||
|
vLayout->addWidget(torrentsLabel);
|
||||||
statusFilters = new StatusFiltersWidget(this);
|
statusFilters = new StatusFiltersWidget(this);
|
||||||
vLayout->addWidget(statusFilters);
|
vLayout->addWidget(statusFilters);
|
||||||
statusFilters->setFocusPolicy(Qt::NoFocus);
|
statusFilters->setFocusPolicy(Qt::NoFocus);
|
||||||
|
QLabel *labelsLabel = new QLabel(tr("Labels"));
|
||||||
|
labelsLabel->setIndent(2);
|
||||||
|
labelsLabel->setFont(font);
|
||||||
|
vLayout->addWidget(labelsLabel);
|
||||||
labelFilters = new LabelFiltersList(this);
|
labelFilters = new LabelFiltersList(this);
|
||||||
vLayout->addWidget(labelFilters);
|
vLayout->addWidget(labelFilters);
|
||||||
labelFilters->setFocusPolicy(Qt::NoFocus);
|
labelFilters->setFocusPolicy(Qt::NoFocus);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue