mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-23 06:09:02 +01:00
Fix QProxyStyle
This commit is contained in:
parent
3696ae44ad
commit
7f442cff3b
@ -40,7 +40,7 @@ const int MoodbarProxyStyle::kArrowWidth = 17;
|
|||||||
const int MoodbarProxyStyle::kArrowHeight = 13;
|
const int MoodbarProxyStyle::kArrowHeight = 13;
|
||||||
|
|
||||||
MoodbarProxyStyle::MoodbarProxyStyle(Application* app, QSlider* slider)
|
MoodbarProxyStyle::MoodbarProxyStyle(Application* app, QSlider* slider)
|
||||||
: QProxyStyle(slider->style()),
|
: QProxyStyle(nullptr),
|
||||||
app_(app),
|
app_(app),
|
||||||
slider_(slider),
|
slider_(slider),
|
||||||
enabled_(true),
|
enabled_(true),
|
||||||
@ -53,6 +53,7 @@ MoodbarProxyStyle::MoodbarProxyStyle(Application* app, QSlider* slider)
|
|||||||
show_moodbar_action_(nullptr),
|
show_moodbar_action_(nullptr),
|
||||||
style_action_group_(nullptr) {
|
style_action_group_(nullptr) {
|
||||||
|
|
||||||
|
setBaseStyle(slider->style());
|
||||||
slider->setStyle(this);
|
slider->setStyle(this);
|
||||||
slider->installEventFilter(this);
|
slider->installEventFilter(this);
|
||||||
|
|
||||||
|
@ -91,7 +91,12 @@ const int PlaylistView::kDropIndicatorWidth = 2;
|
|||||||
const int PlaylistView::kDropIndicatorGradientWidth = 5;
|
const int PlaylistView::kDropIndicatorGradientWidth = 5;
|
||||||
|
|
||||||
PlaylistProxyStyle::PlaylistProxyStyle(QStyle *base)
|
PlaylistProxyStyle::PlaylistProxyStyle(QStyle *base)
|
||||||
: QProxyStyle(base), common_style_(new QCommonStyle) {}
|
: QProxyStyle(nullptr),
|
||||||
|
common_style_(new QCommonStyle) {
|
||||||
|
|
||||||
|
setBaseStyle(base);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void PlaylistProxyStyle::drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const {
|
void PlaylistProxyStyle::drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user