diff --git a/src/playlist/playlistview.cpp b/src/playlist/playlistview.cpp index 84fd2d5e6..b43e60f53 100644 --- a/src/playlist/playlistview.cpp +++ b/src/playlist/playlistview.cpp @@ -215,7 +215,7 @@ PlaylistView::PlaylistView(QWidget *parent) dynamic_controls_->hide(); // To proper scale all pixmaps - device_pixel_ratio = this->devicePixelRatioF(); + device_pixel_ratio_ = devicePixelRatioF(); // For fading connect(fade_animation_, SIGNAL(valueChanged(qreal)), SLOT(FadePreviousBackgroundImage(qreal))); @@ -560,8 +560,8 @@ void PlaylistView::UpdateCachedCurrentRowPixmap(QStyleOptionViewItem option, con cached_current_row_row_ = idx.row(); option.rect.moveTo(0, 0); - cached_current_row_ = QPixmap(option.rect.width() * device_pixel_ratio, option.rect.height() * device_pixel_ratio); - cached_current_row_.setDevicePixelRatio(device_pixel_ratio); + cached_current_row_ = QPixmap(option.rect.width() * device_pixel_ratio_, option.rect.height() * device_pixel_ratio_); + cached_current_row_.setDevicePixelRatio(device_pixel_ratio_); cached_current_row_.fill(Qt::transparent); QPainter p(&cached_current_row_); @@ -1027,8 +1027,8 @@ void PlaylistView::paintEvent(QPaintEvent *event) { if (drop_indicator_row_ != -1) { if (cached_tree_.isNull()) { - cached_tree_ = QPixmap(size().width() * device_pixel_ratio, size().height() * device_pixel_ratio); - cached_tree_.setDevicePixelRatio(device_pixel_ratio); + cached_tree_ = QPixmap(size().width() * device_pixel_ratio_, size().height() * device_pixel_ratio_); + cached_tree_.setDevicePixelRatio(device_pixel_ratio_); cached_tree_.fill(Qt::transparent); QPainter cache_painter(&cached_tree_); diff --git a/src/playlist/playlistview.h b/src/playlist/playlistview.h index ac6df1d36..7c24cc96c 100644 --- a/src/playlist/playlistview.h +++ b/src/playlist/playlistview.h @@ -220,7 +220,7 @@ class PlaylistView : public QTreeView { Playlist *playlist_; PlaylistHeader *header_; - qreal device_pixel_ratio; + qreal device_pixel_ratio_; AppearanceSettingsPage::BackgroundImageType background_image_type_; QString background_image_filename_; AppearanceSettingsPage::BackgroundImagePosition background_image_position_;