Implement GetDPIScaleFactor() more directly for wxMSW too
Use the existing GetDPI() implementation instead of forwarding to wxDisplay.
This commit is contained in:
@@ -100,6 +100,8 @@ public:
|
||||
virtual bool Reparent(wxWindowBase *newParent) wxOVERRIDE;
|
||||
|
||||
virtual wxSize GetDPI() const wxOVERRIDE;
|
||||
virtual double GetDPIScaleFactor() const wxOVERRIDE;
|
||||
|
||||
|
||||
virtual void WarpPointer(int x, int y) wxOVERRIDE;
|
||||
virtual bool EnableTouchEvents(int eventsMask) wxOVERRIDE;
|
||||
|
@@ -105,6 +105,7 @@
|
||||
#include "wx/notebook.h"
|
||||
#include "wx/listctrl.h"
|
||||
#include "wx/dynlib.h"
|
||||
#include "wx/display.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -4858,6 +4859,11 @@ wxSize wxWindowMSW::GetDPI() const
|
||||
return dpi;
|
||||
}
|
||||
|
||||
double wxWindowMSW::GetDPIScaleFactor() const
|
||||
{
|
||||
return GetDPI().y / (double)wxDisplay::GetStdPPIValue();
|
||||
}
|
||||
|
||||
void wxWindowMSW::MSWUpdateFontOnDPIChange(const wxSize& newDPI)
|
||||
{
|
||||
if ( m_font.IsOk() )
|
||||
|
Reference in New Issue
Block a user