comparison layer/SpectrogramLayer.cpp @ 1007:7347cf34f538 tony-2.0-integration

Minor adjustment for higher-res screens
author Chris Cannam
date Tue, 20 Oct 2015 12:53:32 +0100
parents 89f44d182d37
children 2f8340c22e8a
comparison
equal deleted inserted replaced
1004:2e3d388489e5 1007:7347cf34f538
1885 if (paintBlockWidth == 0) { 1885 if (paintBlockWidth == 0) {
1886 paintBlockWidth = (300000 / zoomLevel); 1886 paintBlockWidth = (300000 / zoomLevel);
1887 } else { 1887 } else {
1888 RealTime lastTime = m_lastPaintTime; 1888 RealTime lastTime = m_lastPaintTime;
1889 while (lastTime > RealTime::fromMilliseconds(200) && 1889 while (lastTime > RealTime::fromMilliseconds(200) &&
1890 paintBlockWidth > 50) { 1890 paintBlockWidth > 100) {
1891 paintBlockWidth /= 2; 1891 paintBlockWidth /= 2;
1892 lastTime = lastTime / 2; 1892 lastTime = lastTime / 2;
1893 } 1893 }
1894 while (lastTime < RealTime::fromMilliseconds(90) && 1894 while (lastTime < RealTime::fromMilliseconds(90) &&
1895 paintBlockWidth < 1500) { 1895 paintBlockWidth < 1500) {
1896 paintBlockWidth *= 2; 1896 paintBlockWidth *= 2;
1897 lastTime = lastTime * 2; 1897 lastTime = lastTime * 2;
1898 } 1898 }
1899 } 1899 }
1900 1900
1901 if (paintBlockWidth < 20) paintBlockWidth = 20; 1901 if (paintBlockWidth < 50) paintBlockWidth = 50;
1902 } 1902 }
1903 1903
1904 #ifdef DEBUG_SPECTROGRAM_REPAINT 1904 #ifdef DEBUG_SPECTROGRAM_REPAINT
1905 cerr << "[" << this << "]: last paint width: " << m_lastPaintBlockWidth << ", last paint time: " << m_lastPaintTime << ", new paint width: " << paintBlockWidth << endl; 1905 cerr << "[" << this << "]: last paint width: " << m_lastPaintBlockWidth << ", last paint time: " << m_lastPaintTime << ", new paint width: " << paintBlockWidth << endl;
1906 #endif 1906 #endif