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