Differential D11528 Diff 30570 multimedia/kdenlive/files/patch-src_scopes_audioscopes_spectrogram.cpp
Changeset View
Changeset View
Standalone View
Standalone View
multimedia/kdenlive/files/patch-src_scopes_audioscopes_spectrogram.cpp
Show All 9 Lines | |||||
/usr/include/c++/v1/stdlib.h:115:44: note: candidate function | /usr/include/c++/v1/stdlib.h:115:44: note: candidate function | ||||
inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);} | inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);} | ||||
^ | ^ | ||||
/usr/include/c++/v1/stdlib.h:117:44: note: candidate function | /usr/include/c++/v1/stdlib.h:117:44: note: candidate function | ||||
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);} | inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);} | ||||
^ | ^ | ||||
[...] | [...] | ||||
--- src/scopes/audioscopes/spectrogram.cpp.orig 2016-07-12 21:44:03 UTC | --- src/scopes/audioscopes/spectrogram.cpp.orig 2017-06-15 13:00:06 UTC | ||||
+++ src/scopes/audioscopes/spectrogram.cpp | +++ src/scopes/audioscopes/spectrogram.cpp | ||||
@@ -245,7 +245,7 @@ QImage Spectrogram::renderHUD(uint) | @@ -199,7 +199,7 @@ QImage Spectrogram::renderHUD(uint) | ||||
if (m_aGrid->isChecked()) { | |||||
for (int frameNumber = 0; frameNumber < m_innerScopeRect.height(); frameNumber += minDistY) { | |||||
y = topDist + m_innerScopeRect.height() - 1 - frameNumber; | |||||
- hideText = m_aTrackMouse->isChecked() && m_mouseWithinWidget && abs(y - mouseY) < (int)textDistY && mouseY < m_innerScopeRect.height() | |||||
+ hideText = m_aTrackMouse->isChecked() && m_mouseWithinWidget && qAbs(y - mouseY) < (int)textDistY && mouseY < m_innerScopeRect.height() | |||||
&& mouseX < m_innerScopeRect.width() && mouseX >= 0; | |||||
davinci.drawLine(leftDist, y, leftDist + m_innerScopeRect.width() - 1, y); | |||||
@@ -241,7 +241,7 @@ QImage Spectrogram::renderHUD(uint) | |||||
x = leftDist + (m_innerScopeRect.width()-1) * ((float)hz)/m_freqMax; | x = leftDist + (m_innerScopeRect.width() - 1) * ((float)hz) / m_freqMax; | ||||
// Hide text if it would overlap with the text drawn at the mouse position | // Hide text if it would overlap with the text drawn at the mouse position | ||||
- hideText = m_aTrackMouse->isChecked() && m_mouseWithinWidget && abs(x-(leftDist + mouseX + 20)) < (int) minDistX + 16 | - hideText = m_aTrackMouse->isChecked() && m_mouseWithinWidget && abs(x - (leftDist + mouseX + 20)) < (int) minDistX + 16 | ||||
+ hideText = m_aTrackMouse->isChecked() && m_mouseWithinWidget && abs((int)(x-(leftDist + mouseX + 20))) < (int) minDistX + 16 | + hideText = m_aTrackMouse->isChecked() && m_mouseWithinWidget && qAbs(x - (leftDist + mouseX + 20)) < (int) minDistX + 16 | ||||
&& mouseX < m_innerScopeRect.width() && mouseX >= 0; | && mouseX < m_innerScopeRect.width() && mouseX >= 0; | ||||
if (x <= rightBorder) { | if (x <= rightBorder) { | ||||
@@ -273,7 +273,7 @@ QImage Spectrogram::renderHUD(uint) | @@ -268,7 +268,7 @@ QImage Spectrogram::renderHUD(uint) | ||||
} | } | ||||
// Draw the line at the very right (maximum frequency) | // Draw the line at the very right (maximum frequency) | ||||
x = leftDist + m_innerScopeRect.width()-1; | x = leftDist + m_innerScopeRect.width() - 1; | ||||
- hideText = m_aTrackMouse->isChecked() && m_mouseWithinWidget && abs(x-(leftDist + mouseX + 30)) < (int) minDistX | - hideText = m_aTrackMouse->isChecked() && m_mouseWithinWidget && abs(x - (leftDist + mouseX + 30)) < (int) minDistX | ||||
+ hideText = m_aTrackMouse->isChecked() && m_mouseWithinWidget && abs((int)(x-(leftDist + mouseX + 30))) < (int) minDistX | + hideText = m_aTrackMouse->isChecked() && m_mouseWithinWidget && qAbs(x - (leftDist + mouseX + 30)) < (int) minDistX | ||||
&& mouseX < m_innerScopeRect.width() && mouseX >= 0; | && mouseX < m_innerScopeRect.width() && mouseX >= 0; | ||||
davinci.drawLine(x, topDist, x, topDist + m_innerScopeRect.height()+6); | davinci.drawLine(x, topDist, x, topDist + m_innerScopeRect.height() + 6); | ||||
if (!hideText) { | if (!hideText) { |