1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01:00

Using proper (thin) spaces with units

This commit is contained in:
Martin Tůma 2015-10-19 09:54:29 +02:00
parent cfc669bc33
commit b9accff81e
3 changed files with 18 additions and 14 deletions

View File

@ -47,10 +47,14 @@ void ElevationGraph::loadGPX(const GPX &gpx)
_max = qMax(_max, max); _max = qMax(_max, max);
_min = qMin(_min, min); _min = qMin(_min, min);
addInfo(tr("Ascent"), QString::number(_ascent, 'f', 0) + " " + _yUnits); addInfo(tr("Ascent"), QString::number(_ascent, 'f', 0)
addInfo(tr("Descent"), QString::number(_descent, 'f', 0) + " " + _yUnits); + QString::fromUtf8("\u2009") + _yUnits);
addInfo(tr("Maximum"), QString::number(_max, 'f', 0) + " " + _yUnits); addInfo(tr("Descent"), QString::number(_descent, 'f', 0)
addInfo(tr("Minimum"), QString::number(_min, 'f', 0) + " " + _yUnits); + QString::fromUtf8("\u2009") + _yUnits);
addInfo(tr("Maximum"), QString::number(_max, 'f', 0)
+ QString::fromUtf8("\u2009") + _yUnits);
addInfo(tr("Minimum"), QString::number(_min, 'f', 0)
+ QString::fromUtf8("\u2009") + _yUnits);
Graph::loadData(data); Graph::loadData(data);
} }

View File

@ -297,17 +297,17 @@ void GUI::saveFile(const QString &fileName)
QGraphicsScene scene; QGraphicsScene scene;
InfoItem info; InfoItem info;
info.insert(tr("Distance"), QString::number(_distance / 1000, 'f', 1) + " " info.insert(tr("Distance"), QString::number(_distance / 1000, 'f', 1)
+ tr("km")); + QString::fromUtf8("\u2009") + tr("km"));
info.insert(tr("Time"), timeSpan(_time)); info.insert(tr("Time"), timeSpan(_time));
info.insert(tr("Ascent"), QString::number(_elevationGraph->ascent(), 'f', 0) info.insert(tr("Ascent"), QString::number(_elevationGraph->ascent(), 'f', 0)
+ " " + tr("m")); + QString::fromUtf8("\u2009") + tr("m"));
info.insert(tr("Descent"), QString::number(_elevationGraph->descent(), 'f', info.insert(tr("Descent"), QString::number(_elevationGraph->descent(), 'f',
0) + " " + tr("m")); 0) + QString::fromUtf8("\u2009") + tr("m"));
info.insert(tr("Maximum"), QString::number(_elevationGraph->max(), 'f', 0) info.insert(tr("Maximum"), QString::number(_elevationGraph->max(), 'f', 0)
+ " " + tr("m")); + QString::fromUtf8("\u2009") + tr("m"));
info.insert(tr("Minimum"), QString::number(_elevationGraph->min(), 'f', 0) info.insert(tr("Minimum"), QString::number(_elevationGraph->min(), 'f', 0)
+ " " + tr("m")); + QString::fromUtf8("\u2009") + tr("m"));
scene.addItem(&info); scene.addItem(&info);
scene.render(&p, QRectF(0, 0, printer.width(), 200)); scene.render(&p, QRectF(0, 0, printer.width(), 200));

View File

@ -32,10 +32,10 @@ void SpeedGraph::loadGPX(const GPX &gpx)
_max = qMax(_max, max); _max = qMax(_max, max);
addInfo(tr("Average"), QString::number(avg() * _yScale, 'f', 1) + " " addInfo(tr("Average"), QString::number(avg() * _yScale, 'f', 1)
+ _yUnits); + QString::fromUtf8("\u2009") + _yUnits);
addInfo(tr("Maximum"), QString::number(_max * _yScale, 'f', 1) + " " addInfo(tr("Maximum"), QString::number(_max * _yScale, 'f', 1)
+ _yUnits); + QString::fromUtf8("\u2009") + _yUnits);
Graph::loadData(data); Graph::loadData(data);
} }