Mercurial > hg > svgui
comparison layer/LogNumericalScale.cpp @ 1486:ac0a8addabcf
Merge from branch by-id
author | Chris Cannam |
---|---|
date | Wed, 17 Jul 2019 14:25:16 +0100 |
parents | f2525e6cbdf1 |
children |
comparison
equal
deleted
inserted
replaced
1468:de41a11cabc2 | 1486:ac0a8addabcf |
---|---|
26 | 26 |
27 int | 27 int |
28 LogNumericalScale::getWidth(LayerGeometryProvider *, | 28 LogNumericalScale::getWidth(LayerGeometryProvider *, |
29 QPainter &paint) | 29 QPainter &paint) |
30 { | 30 { |
31 // Qt 5.13 deprecates QFontMetrics::width(), but its suggested | |
32 // replacement (horizontalAdvance) was only added in Qt 5.11 | |
33 // which is too new for us | |
34 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | |
35 | |
31 return paint.fontMetrics().width("-000.00") + 10; | 36 return paint.fontMetrics().width("-000.00") + 10; |
32 } | 37 } |
33 | 38 |
34 void | 39 void |
35 LogNumericalScale::paintVertical(LayerGeometryProvider *v, | 40 LogNumericalScale::paintVertical(LayerGeometryProvider *v, |