Ticket #55160: spectrogram.cpp.diff
File spectrogram.cpp.diff, 2.1 KB (added by jmroot (Joshua Root), 7 years ago) |
---|
-
src/scopes/audioscopes/spectrogram.cpp
old new QImage Spectrogram::renderHUD(uint) 199 199 if (m_aGrid->isChecked()) { 200 200 for (int frameNumber = 0; frameNumber < m_innerScopeRect.height(); frameNumber += minDistY) { 201 201 y = topDist + m_innerScopeRect.height()-1 - frameNumber; 202 hideText = m_aTrackMouse->isChecked() && m_mouseWithinWidget && abs( y - mouseY) < (int)textDistY && mouseY < m_innerScopeRect.height()202 hideText = m_aTrackMouse->isChecked() && m_mouseWithinWidget && abs((int)(y - mouseY)) < (int)textDistY && mouseY < m_innerScopeRect.height() 203 203 && mouseX < m_innerScopeRect.width() && mouseX >= 0; 204 204 205 205 davinci.drawLine(leftDist, y, leftDist + m_innerScopeRect.width()-1, y); … … QImage Spectrogram::renderHUD(uint) 241 241 x = leftDist + (m_innerScopeRect.width()-1) * ((float)hz)/m_freqMax; 242 242 243 243 // Hide text if it would overlap with the text drawn at the mouse position 244 hideText = m_aTrackMouse->isChecked() && m_mouseWithinWidget && abs( x-(leftDist + mouseX + 20)) < (int) minDistX + 16244 hideText = m_aTrackMouse->isChecked() && m_mouseWithinWidget && abs((int)(x-(leftDist + mouseX + 20))) < (int) minDistX + 16 245 245 && mouseX < m_innerScopeRect.width() && mouseX >= 0; 246 246 247 247 if (x <= rightBorder) { … … QImage Spectrogram::renderHUD(uint) 269 269 } 270 270 // Draw the line at the very right (maximum frequency) 271 271 x = leftDist + m_innerScopeRect.width()-1; 272 hideText = m_aTrackMouse->isChecked() && m_mouseWithinWidget && abs( x-(leftDist + mouseX + 30)) < (int) minDistX272 hideText = m_aTrackMouse->isChecked() && m_mouseWithinWidget && abs((int)(x-(leftDist + mouseX + 30))) < (int) minDistX 273 273 && mouseX < m_innerScopeRect.width() && mouseX >= 0; 274 274 davinci.drawLine(x, topDist, x, topDist + m_innerScopeRect.height()+6); 275 275 if (!hideText) {