Make wxDC::GetPPI() monitor-dependent in wxGTK3
Return the PPI for the display on which the associated window is shown and not the main display PPI.
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
#include "wx/dcmemory.h"
|
#include "wx/dcmemory.h"
|
||||||
#include "wx/dcscreen.h"
|
#include "wx/dcscreen.h"
|
||||||
|
#include "wx/display.h"
|
||||||
#include "wx/gdicmn.h"
|
#include "wx/gdicmn.h"
|
||||||
#include "wx/icon.h"
|
#include "wx/icon.h"
|
||||||
#include "wx/gtk/dc.h"
|
#include "wx/gtk/dc.h"
|
||||||
@@ -238,7 +239,7 @@ wxSize wxGTKCairoDCImpl::GetPPI() const
|
|||||||
{
|
{
|
||||||
if ( m_window )
|
if ( m_window )
|
||||||
{
|
{
|
||||||
return wxGetDisplayPPI();
|
return wxDisplay(m_window).GetPPI();
|
||||||
}
|
}
|
||||||
|
|
||||||
// For a non-window-based DC the concept of PPI doesn't make much sense
|
// For a non-window-based DC the concept of PPI doesn't make much sense
|
||||||
|
Reference in New Issue
Block a user