Mercurial > hg > svgui
comparison layer/LinearColourScale.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 |
---|---|
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, |