Mercurial > hg > svgui
diff layer/LinearNumericalScale.cpp @ 1281:fc9d9f1103fa horizontal-scale
Provide linear horizontal scale in spectrum as well as log; fix bin positioning and colour scale property box updating; ensure proper background colour and visibility of peak lines
author | Chris Cannam |
---|---|
date | Thu, 03 May 2018 15:15:15 +0100 |
parents | b4cb11ca8233 |
children | f2525e6cbdf1 |
line wrap: on
line diff
--- a/layer/LinearNumericalScale.cpp Wed May 02 14:27:17 2018 +0100 +++ b/layer/LinearNumericalScale.cpp Thu May 03 15:15:15 2018 +0100 @@ -4,7 +4,7 @@ Sonic Visualiser An audio file viewer and annotation editor. Centre for Digital Music, Queen Mary, University of London. - This file copyright 2006-2013 Chris Cannam and QMUL. + This file copyright 2006-2018 Chris Cannam and QMUL. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -15,25 +15,19 @@ #include "LinearNumericalScale.h" #include "VerticalScaleLayer.h" +#include "LayerGeometryProvider.h" #include <QPainter> #include <cmath> -#include "LayerGeometryProvider.h" - #include "base/ScaleTickIntervals.h" int LinearNumericalScale::getWidth(LayerGeometryProvider *, - QPainter &paint, - bool horizontal) + QPainter &paint) { - if (horizontal) { - return paint.fontMetrics().height() + 10; - } else { - return paint.fontMetrics().width("-000.00") + 10; - } + return paint.fontMetrics().width("-000.00") + 10; } void