mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-05 12:56:52 +01:00
ContextAlbum: Move rescaling back to paintevent
This commit is contained in:
parent
23f3d2095b
commit
4733c84a86
@ -96,7 +96,7 @@ QSize ContextAlbum::sizeHint() const {
|
||||
|
||||
}
|
||||
|
||||
void ContextAlbum::resizeEvent(QResizeEvent *e) {
|
||||
void ContextAlbum::paintEvent(QPaintEvent*) {
|
||||
|
||||
if (width() != prev_width_) {
|
||||
ScaleCover();
|
||||
@ -104,12 +104,6 @@ void ContextAlbum::resizeEvent(QResizeEvent *e) {
|
||||
prev_width_ = width();
|
||||
}
|
||||
|
||||
QWidget::resizeEvent(e);
|
||||
|
||||
}
|
||||
|
||||
void ContextAlbum::paintEvent(QPaintEvent*) {
|
||||
|
||||
QPainter p(this);
|
||||
p.setRenderHint(QPainter::SmoothPixmapTransform);
|
||||
DrawPreviousCovers(&p);
|
||||
|
@ -55,7 +55,6 @@ class ContextAlbum : public QWidget {
|
||||
protected:
|
||||
QSize sizeHint() const override;
|
||||
void paintEvent(QPaintEvent*) override;
|
||||
void resizeEvent(QResizeEvent *e) override;
|
||||
void mouseDoubleClickEvent(QMouseEvent *e) override;
|
||||
void contextMenuEvent(QContextMenuEvent *e) override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user