mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-03 13:30:26 +01:00
Fix background not loading.
This commit is contained in:
parent
de23c3181f
commit
c393926be6
@ -112,7 +112,9 @@ PlaylistView::PlaylistView(QWidget* parent)
|
||||
upgrading_from_qheaderview_(false),
|
||||
read_only_settings_(true),
|
||||
upgrading_from_version_(-1),
|
||||
background_initialized_(false),
|
||||
background_image_type_(Default),
|
||||
//background_image_filename_("_"),
|
||||
blur_radius_(kDefaultBlurRadius),
|
||||
opacity_level_(kDefaultOpacityLevel),
|
||||
previous_background_image_opacity_(0.0),
|
||||
@ -1127,10 +1129,11 @@ void PlaylistView::ReloadSettings() {
|
||||
// set_background_image when it is not needed, as this will cause the fading
|
||||
// animation to start again. This also avoid to do useless
|
||||
// "force_background_redraw".
|
||||
if (background_image_filename != background_image_filename_ ||
|
||||
if (background_initialized_ == false || background_image_filename != background_image_filename_ ||
|
||||
background_type != background_image_type_ ||
|
||||
blur_radius_ != blur_radius || opacity_level_ != opacity_level) {
|
||||
// Store background properties
|
||||
background_initialized_ = true;
|
||||
background_image_type_ = background_type;
|
||||
background_image_filename_ = background_image_filename;
|
||||
blur_radius_ = blur_radius;
|
||||
|
@ -195,15 +195,17 @@ signals:
|
||||
bool read_only_settings_;
|
||||
int upgrading_from_version_;
|
||||
|
||||
bool background_initialized_;
|
||||
BackgroundImageType background_image_type_;
|
||||
// Used if background image is a filemane
|
||||
QString background_image_filename_;
|
||||
// Stores the background image to be displayed. As we want this image to be
|
||||
// particular (in terms of format, opacity), you should probably use
|
||||
// set_background_image_type instead of modifying background_image_ directly
|
||||
QImage background_image_;
|
||||
int blur_radius_;
|
||||
int opacity_level_;
|
||||
// Used if background image is a filemane
|
||||
QString background_image_filename_;
|
||||
|
||||
QImage current_song_cover_art_;
|
||||
QPixmap cached_scaled_background_image_;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user