Make wxWindow::GetContentScaleFactor() return 1 under MSW again
This reverts bc492a9e6e (Make wxWindow::GetContentScaleFactor() useful
for non-OSX platforms., 2015-03-18) and restores the old behaviour from
wxWidgets 3.0, which consisted in only returning factor different from 1
from this function for the platforms distinguishing logical and physical
pixels.
After this change, the return value of this function can be portably
used on all platforms to convert between logical and physical pixels,
independently of the current DPI.
This commit is contained in:
@@ -812,7 +812,12 @@ static wxSize GetDPIHelper(const wxWindowBase* w)
|
||||
|
||||
double wxWindowBase::GetContentScaleFactor() const
|
||||
{
|
||||
return GetDPIScaleFactor();
|
||||
// By default, we assume that there is no mapping between logical and
|
||||
// physical pixels and so the content scale factor is just 1. Only the
|
||||
// platforms that do perform such mapping (currently ports for Apple
|
||||
// platforms and GTK 3) override this function to return something
|
||||
// different.
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
double wxWindowBase::GetDPIScaleFactor() const
|
||||
|
||||
Reference in New Issue
Block a user