PlaylistView: Create proxy style based on application style
Fixes #1275
This commit is contained in:
parent
2a9b32690d
commit
e172c4871c
|
@ -88,7 +88,7 @@ const int PlaylistView::kAutoscrollGraceTimeout = 30; // seconds
|
|||
const int PlaylistView::kDropIndicatorWidth = 2;
|
||||
const int PlaylistView::kDropIndicatorGradientWidth = 5;
|
||||
|
||||
PlaylistProxyStyle::PlaylistProxyStyle(QObject*) : QProxyStyle(nullptr), common_style_(new QCommonStyle) {}
|
||||
PlaylistProxyStyle::PlaylistProxyStyle(const QString &style) : QProxyStyle(style), common_style_(new QCommonStyle) {}
|
||||
|
||||
void PlaylistProxyStyle::drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const {
|
||||
|
||||
|
@ -131,7 +131,7 @@ void PlaylistProxyStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt
|
|||
PlaylistView::PlaylistView(QWidget *parent)
|
||||
: QTreeView(parent),
|
||||
app_(nullptr),
|
||||
style_(new PlaylistProxyStyle()),
|
||||
style_(new PlaylistProxyStyle(QApplication::style()->name())),
|
||||
playlist_(nullptr),
|
||||
header_(new PlaylistHeader(Qt::Horizontal, this, this)),
|
||||
background_image_type_(AppearanceSettingsPage::BackgroundImageType::Default),
|
||||
|
|
|
@ -84,7 +84,7 @@ class PlaylistProxyStyle : public QProxyStyle {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PlaylistProxyStyle(QObject *parent = nullptr);
|
||||
explicit PlaylistProxyStyle(const QString &style);
|
||||
|
||||
void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const override;
|
||||
void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const override;
|
||||
|
|
Loading…
Reference in New Issue