From 2f8098e48bd02f4b38eebff4b3b2219fbe6e6c67 Mon Sep 17 00:00:00 2001 From: m0dB Date: Sun, 6 Oct 2024 03:31:39 +0200 Subject: [PATCH] replace resize with setViewport, setRect, setDevicePixelRatio --- src/waveform/widgets/waveformwidgetabstract.cpp | 6 ++++-- src/waveform/widgets/waveformwidgetabstract.h | 7 ++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/waveform/widgets/waveformwidgetabstract.cpp b/src/waveform/widgets/waveformwidgetabstract.cpp index 5b83ca58790..94b525aa54a 100644 --- a/src/waveform/widgets/waveformwidgetabstract.cpp +++ b/src/waveform/widgets/waveformwidgetabstract.cpp @@ -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(devicePixelRatio)); + setSize(QSize(width, height)); + setDevicePixelRatio(static_cast(devicePixelRatio)); } +*/ diff --git a/src/waveform/widgets/waveformwidgetabstract.h b/src/waveform/widgets/waveformwidgetabstract.h index ef5cec02071..0a4432d1e03 100644 --- a/src/waveform/widgets/waveformwidgetabstract.h +++ b/src/waveform/widgets/waveformwidgetabstract.h @@ -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;