Only draw text when show/hide timeline is finished
This commit is contained in:
parent
30001be0ee
commit
8680a54ae4
|
@ -271,7 +271,7 @@ void PlayingWidget::Stopped() {
|
|||
active_ = false;
|
||||
song_playing_ = Song();
|
||||
song_ = Song();
|
||||
image_original_ = QImage();
|
||||
image_current_ = QImage();
|
||||
SetVisible(false);
|
||||
|
||||
}
|
||||
|
@ -294,11 +294,13 @@ void PlayingWidget::SongChanged(const Song &song) {
|
|||
|
||||
void PlayingWidget::AlbumCoverLoaded(const Song &song, const QImage &image) {
|
||||
|
||||
if (!playing_ || song != song_playing_ || image == image_original_) return;
|
||||
if (!playing_ || song != song_playing_ || image == image_current_) return;
|
||||
|
||||
active_ = true;
|
||||
downloading_covers_ = false;
|
||||
song_ = song;
|
||||
image_current_ = image;
|
||||
|
||||
SetImage(image);
|
||||
|
||||
}
|
||||
|
@ -455,9 +457,11 @@ void PlayingWidget::DrawContents(QPainter *p) {
|
|||
}
|
||||
|
||||
// Draw the text below
|
||||
if (timeline_show_hide_->state() != QTimeLine::Running) {
|
||||
p->translate(x_offset, height() - text_height);
|
||||
details_->drawContents(p);
|
||||
p->translate(-x_offset, -height() + text_height);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -136,6 +136,7 @@ class PlayingWidget : public QWidget {
|
|||
|
||||
Song song_;
|
||||
Song song_playing_;
|
||||
QImage image_current_;
|
||||
QImage image_original_;
|
||||
QPixmap pixmap_cover_;
|
||||
QPixmap pixmap_previous_track_;
|
||||
|
|
Loading…
Reference in New Issue