changeset 973:bc23c2cfff65 osx-retina

Rounding
author Chris Cannam
date Wed, 10 Jun 2015 14:27:55 +0100
parents 1011ffb1b6d5
children 64c2b3a4435a 50940a7425ae
files layer/Colour3DPlotLayer.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/layer/Colour3DPlotLayer.cpp	Wed Jun 10 13:38:02 2015 +0100
+++ b/layer/Colour3DPlotLayer.cpp	Wed Jun 10 14:27:55 2015 +0100
@@ -869,7 +869,7 @@
         paint.save();
 
         QFont font = paint.font();
-        font.setPixelSize(font.pixelSize() * 0.65);
+        font.setPixelSize(int(font.pixelSize() * 0.65));
         paint.setFont(font);
 
         int msw = paint.fontMetrics().width(maxstr);
@@ -920,7 +920,7 @@
             if (paint.fontMetrics().height() >= h) {
                 if (h >= defaultFontHeight * 0.8) {
                     QFont tf = paint.font();
-                    tf.setPixelSize(h * 0.8);
+                    tf.setPixelSize(int(h * 0.8));
                     paint.setFont(tf);
                 } else {
                     continue;