Mercurial > hg > svgui
comparison 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 |
comparison
equal
deleted
inserted
replaced
1396:2e316a724336 | 1397:9ea551137329 |
---|---|
800 } | 800 } |
801 | 801 |
802 if (illuminateThis) { | 802 if (illuminateThis) { |
803 int labelY = v->getPaintHeight() - | 803 int labelY = v->getPaintHeight() - |
804 getHorizontalScaleHeight(v, paint) - | 804 getHorizontalScaleHeight(v, paint) - |
805 paint.fontMetrics().height() * 3; | 805 paint.fontMetrics().height() * 4; |
806 QString text = tr("%1 Hz").arg(freq); | 806 QString text = tr("%1 Hz").arg(freq); |
807 int lw = paint.fontMetrics().width(text); | 807 int lw = paint.fontMetrics().width(text); |
808 int gap = ViewManager::scalePixelSize(3); | 808 int gap = ViewManager::scalePixelSize(v->getXForViewX(3)); |
809 double half = double(gap)/2.0; | 809 double half = double(gap)/2.0; |
810 int labelX = x - lw - gap; | 810 int labelX = x - lw - gap; |
811 if (labelX < getVerticalScaleWidth(v, false, paint)) { | 811 if (labelX < getVerticalScaleWidth(v, false, paint)) { |
812 labelX = x + gap; | 812 labelX = x + gap; |
813 } | 813 } |