comparison layer/PaintAssistant.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
112 bool spaceForLabel = (i == 0 || 112 bool spaceForLabel = (i == 0 ||
113 abs(y - lastLabelledY) >= textHeight - 1); 113 abs(y - lastLabelledY) >= textHeight - 1);
114 114
115 if (spaceForLabel) { 115 if (spaceForLabel) {
116 116
117 // Qt 5.13 deprecates QFontMetrics::width(), but its suggested
118 // replacement (horizontalAdvance) was only added in Qt 5.11
119 // which is too new for us
120 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
121
117 int tx = 3; 122 int tx = 3;
118 if (paint.fontMetrics().width(text) < w - 10) { 123 if (paint.fontMetrics().width(text) < w - 10) {
119 tx = w - 10 - paint.fontMetrics().width(text); 124 tx = w - 10 - paint.fontMetrics().width(text);
120 } 125 }
121 126