]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/gdicmn.cpp
add wxGenericStaticText (#9656)
[wxWidgets.git] / src / common / gdicmn.cpp
index f56aad7d4c3417aeae429e757de1c9e0ce715aeb..4129b48782485b86dddceed443659ba391bbdaf2 100644 (file)
@@ -31,6 +31,7 @@
     #include "wx/bitmap.h"
     #include "wx/colour.h"
     #include "wx/font.h"
+    #include "wx/math.h"
 #endif
 
 
@@ -885,8 +886,8 @@ wxSize wxGetDisplayPPI()
     const wxSize pixels = wxGetDisplaySize();
     const wxSize mm = wxGetDisplaySizeMM();
 
-    return wxSize((pixels.x * 25.4) / mm.x,
-                  (pixels.y * 25.4) / mm.y);
+    return wxSize((int)((pixels.x * inches2mm) / mm.x),
+                  (int)((pixels.y * inches2mm) / mm.y));
 }
 
 wxResourceCache::~wxResourceCache ()