diff widgets/WidgetScale.h @ 1308:e7c9650e74a7

Never scale down
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 26 Jun 2018 14:36:56 +0100
parents be5e43e2180c
children
line wrap: on
line diff
--- a/widgets/WidgetScale.h	Tue Jun 26 08:35:49 2018 +0100
+++ b/widgets/WidgetScale.h	Tue Jun 26 14:36:56 2018 +0100
@@ -43,6 +43,11 @@
             SVDEBUG << "WidgetScale::scalePixelSize: baseEm = " << baseEm
                     << ", platform default font height = " << em
                     << ", resulting scale factor = " << ratio << endl;
+            if (ratio < 1.0) {
+                SVDEBUG << "WidgetScale::scalePixelSize: rounding up to 1.0"
+                        << endl;
+                ratio = 1.0;
+            }
         }
 
         int scaled = int(pixels * ratio + 0.5);