Skip to content

Commit

Permalink
replace resize with setViewport, setRect, setDevicePixelRatio
Browse files Browse the repository at this point in the history
  • Loading branch information
m0dB authored and m0dB committed Oct 6, 2024
1 parent 133e664 commit 2f8098e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/waveform/widgets/waveformwidgetabstract.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,14 @@ mixxx::Duration WaveformWidgetAbstract::render() {
// Time for Painter setup, unknown in this case
return mixxx::Duration();
}

/*
void WaveformWidgetAbstract::resize(int width, int height) {
qreal devicePixelRatio = 1.0;
if (m_widget) {
m_widget->resize(width, height);
devicePixelRatio = m_widget->devicePixelRatioF();
}
resizeRenderer(width, height, static_cast<float>(devicePixelRatio));
setSize(QSize(width, height));
setDevicePixelRatio(static_cast<float>(devicePixelRatio));
}
*/
7 changes: 6 additions & 1 deletion src/waveform/widgets/waveformwidgetabstract.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ class WaveformWidgetAbstract : public WaveformWidgetRenderer {

virtual void preRender(VSyncThread* vsyncThread);
virtual mixxx::Duration render();
virtual void resize(int width, int height);
virtual void setViewport(const QSize&) {
}
virtual void setRect(const QRectF&) {
}
virtual void setDevicePixelRatio(float) {
}

protected:
QWidget* m_widget;
Expand Down

0 comments on commit 2f8098e

Please sign in to comment.