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:
parent
eb00016c5a
commit
d43be80dab
@ -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 ()
|
||||
|
Loading…
Reference in New Issue
Block a user