From fe570b14264819bb2a67928caf2d50fe7fd95d7a Mon Sep 17 00:00:00 2001 From: Antoine C Date: Sat, 9 Nov 2024 19:55:02 +0000 Subject: [PATCH] fix intro/outro marker and zoom reset --- res/qml/Deck.qml | 48 +++++++++++++++++++ res/qml/WaveformDisplay.qml | 3 +- .../renderers/waveformwidgetrenderer.cpp | 8 ---- 3 files changed, 50 insertions(+), 9 deletions(-) diff --git a/res/qml/Deck.qml b/res/qml/Deck.qml index 46ff28bd465..68b575973b7 100644 --- a/res/qml/Deck.qml +++ b/res/qml/Deck.qml @@ -326,6 +326,54 @@ Item { activeColor: Theme.deckActiveColor } + Row { + anchors.left: playButton.right + anchors.leftMargin: 10 + anchors.bottom: playButton.bottom + anchors.topMargin: 5 + spacing: -1 + + Skin.IntroOutroButton { + keyPrefix: "intro_start" + group: root.group + + text: "Intro\nStart" + + width: playButton.height * 2 - 1 + height: playButton.height + } + + Skin.IntroOutroButton { + keyPrefix: "intro_end" + group: root.group + + text: "Intro\nEnd" + + width: playButton.height * 2 - 1 + height: playButton.height + } + + Skin.IntroOutroButton { + keyPrefix: "outro_start" + group: root.group + + text: "Outro\nStart" + + width: playButton.height * 2 - 1 + height: playButton.height + } + + Skin.IntroOutroButton { + keyPrefix: "outro_end" + group: root.group + + text: "Outro\nEnd" + + width: playButton.height * 2 - 1 + height: playButton.height + } + } + Row { anchors.left: cueButton.right anchors.top: parent.top diff --git a/res/qml/WaveformDisplay.qml b/res/qml/WaveformDisplay.qml index 22209a8719e..bfb974d9429 100644 --- a/res/qml/WaveformDisplay.qml +++ b/res/qml/WaveformDisplay.qml @@ -110,6 +110,7 @@ Item { } Mixxx.WaveformMark { control: "intro_start_position" + text: '◢' align: 'top|right' color: 'blue' textColor: '#FFFFFF' @@ -130,6 +131,7 @@ Item { } Mixxx.WaveformMark { control: "outro_end_position" + text: '◣' align: 'top|left' color: 'blue' textColor: '#FFFFFF' @@ -171,7 +173,6 @@ Item { group: root.group key: "waveform_zoom" } - readonly property real effectiveZoomFactor: (1 / rateRatioControl.value) * (100 / zoomControl.value) MouseArea { property int mouseStatus: WaveformDisplay.MouseStatus.Normal diff --git a/src/waveform/renderers/waveformwidgetrenderer.cpp b/src/waveform/renderers/waveformwidgetrenderer.cpp index d6a8b138f13..0550152123b 100644 --- a/src/waveform/renderers/waveformwidgetrenderer.cpp +++ b/src/waveform/renderers/waveformwidgetrenderer.cpp @@ -86,14 +86,6 @@ WaveformWidgetRenderer::~WaveformWidgetRenderer() { } bool WaveformWidgetRenderer::init() { - m_trackPixelCount = 0.0; - m_zoomFactor = 1.0; - m_visualSamplePerPixel = 1.0; - m_audioSamplePerPixel = 1.0; - m_totalVSamples = 0; - m_gain = 1.0; - m_trackSamples = 0.0; - for (int type = ::WaveformRendererAbstract::Play; type <= ::WaveformRendererAbstract::Slip; type++) {