use inches2mm instead of literal constant in wxGetDisplayPPI()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55801 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -31,6 +31,7 @@
|
|||||||
#include "wx/bitmap.h"
|
#include "wx/bitmap.h"
|
||||||
#include "wx/colour.h"
|
#include "wx/colour.h"
|
||||||
#include "wx/font.h"
|
#include "wx/font.h"
|
||||||
|
#include "wx/math.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -885,8 +886,8 @@ wxSize wxGetDisplayPPI()
|
|||||||
const wxSize pixels = wxGetDisplaySize();
|
const wxSize pixels = wxGetDisplaySize();
|
||||||
const wxSize mm = wxGetDisplaySizeMM();
|
const wxSize mm = wxGetDisplaySizeMM();
|
||||||
|
|
||||||
return wxSize((pixels.x * 25.4) / mm.x,
|
return wxSize((int)((pixels.x * inches2mm) / mm.x),
|
||||||
(pixels.y * 25.4) / mm.y);
|
(int)((pixels.y * inches2mm) / mm.y));
|
||||||
}
|
}
|
||||||
|
|
||||||
wxResourceCache::~wxResourceCache ()
|
wxResourceCache::~wxResourceCache ()
|
||||||
|
|||||||
Reference in New Issue
Block a user