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