use common contentScaleFactor also for DPI on macOS
and give a reasonable default for missing tlw
This commit is contained in:
committed by
Vadim Zeitlin
parent
c346fd0321
commit
08a63c3b49
@@ -2636,13 +2636,7 @@ wxSize wxWindowMac::GetDPI() const
|
||||
// on mac ContentScale and DPIScale are identical
|
||||
double wxWindowMac::GetDPIScaleFactor() const
|
||||
{
|
||||
double scaleFactor;
|
||||
if ( wxNonOwnedWindow* tlw = MacGetTopLevelWindow() )
|
||||
scaleFactor = tlw->GetContentScaleFactor();
|
||||
else
|
||||
scaleFactor = wxOSXGetMainScreenContentScaleFactor();
|
||||
|
||||
return scaleFactor;
|
||||
return GetContentScaleFactor();
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user