changeset 1194:be5e43e2180c levelpanwidget

Record scale factor in log
author Chris Cannam
date Thu, 15 Dec 2016 16:29:18 +0000
parents 54e6be7ebe11
children 51bb2582c2cc
files widgets/WidgetScale.h
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/widgets/WidgetScale.h	Thu Dec 15 15:34:33 2016 +0000
+++ b/widgets/WidgetScale.h	Thu Dec 15 16:29:18 2016 +0000
@@ -18,6 +18,8 @@
 #include <QFont>
 #include <QFontMetrics>
 
+#include "base/Debug.h"
+
 class WidgetScale
 {
 public:   
@@ -38,6 +40,9 @@
 #endif
             double em = QFontMetrics(QFont()).height();
             ratio = em / baseEm;
+            SVDEBUG << "WidgetScale::scalePixelSize: baseEm = " << baseEm
+                    << ", platform default font height = " << em
+                    << ", resulting scale factor = " << ratio << endl;
         }
 
         int scaled = int(pixels * ratio + 0.5);