]> Devoid-pointer.net GitWeb - anyanka.git/commitdiff
Use helper functions to get display DPI in SignalDrawer
authorMichal Malý <madcatxster@devoid-pointer.net>
Thu, 2 Apr 2015 20:19:44 +0000 (22:19 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Thu, 2 Apr 2015 20:19:44 +0000 (22:19 +0200)
signaldrawer.cpp

index 60bfefd4132e4132209c9172f2462e6453a2b452..bc7c957b1ed55cbc34becd8b183991040723c18e 100644 (file)
@@ -23,8 +23,6 @@
 #include "helpers.h"
 #include "logger.h"
 #include "signaldrawer.h"
-#include <QApplication>
-#include <QDesktopWidget>
 #include <QFontMetrics>
 
 const int SignalDrawer::AXIS_LABEL_BORDER_OFFSET(2);
@@ -57,8 +55,8 @@ SignalDrawer::SignalDrawer(std::shared_ptr<SignalController> controller, const C
     m_dpiX = dpiX;
     m_dpiY = dpiY;
   } else {
-    m_dpiX = qApp->desktop()->logicalDpiX();
-    m_dpiY = qApp->desktop()->logicalDpiY();
+    m_dpiX = Helpers::dpiX();
+    m_dpiY = Helpers::dpiY();
   }
 
   m_axisLabelFont = new QFont("arial", scaleToDpiX(LABEL_FONT_SIZE));