Mercurial > hg > svgui
diff layer/SpectrumLayer.cpp @ 1397:9ea551137329
Fix some incorrect pixel scaling
author | Chris Cannam |
---|---|
date | Wed, 14 Nov 2018 15:04:04 +0000 |
parents | 2e316a724336 |
children | f228bee4981c |
line wrap: on
line diff
--- a/layer/SpectrumLayer.cpp Wed Nov 14 14:29:08 2018 +0000 +++ b/layer/SpectrumLayer.cpp Wed Nov 14 15:04:04 2018 +0000 @@ -802,10 +802,10 @@ if (illuminateThis) { int labelY = v->getPaintHeight() - getHorizontalScaleHeight(v, paint) - - paint.fontMetrics().height() * 3; + paint.fontMetrics().height() * 4; QString text = tr("%1 Hz").arg(freq); int lw = paint.fontMetrics().width(text); - int gap = ViewManager::scalePixelSize(3); + int gap = ViewManager::scalePixelSize(v->getXForViewX(3)); double half = double(gap)/2.0; int labelX = x - lw - gap; if (labelX < getVerticalScaleWidth(v, false, paint)) {