Make wxBitmap ctors consistent wrt passing scale for conversion from wxImage; HiDPI adaptation for propgrid buffer and wxRTC images
This commit is contained in:
@@ -4660,13 +4660,15 @@ void wxPropertyGrid::OnResize( wxSizeEvent& event )
|
||||
|
||||
if ( !HasExtraStyle(wxPG_EX_NATIVE_DOUBLE_BUFFERING) )
|
||||
{
|
||||
double scaleFactor = GetContentScaleFactor();
|
||||
int dblh = (m_lineHeight*2);
|
||||
if ( !m_doubleBuffer )
|
||||
{
|
||||
// Create double buffer bitmap to draw on, if none
|
||||
int w = wxMax(width, 250);
|
||||
int h = wxMax(height + dblh, 400);
|
||||
m_doubleBuffer = new wxBitmap( w, h );
|
||||
m_doubleBuffer = new wxBitmap;
|
||||
m_doubleBuffer->CreateScaled( w, h, wxBITMAP_SCREEN_DEPTH, scaleFactor );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4679,7 +4681,8 @@ void wxPropertyGrid::OnResize( wxSizeEvent& event )
|
||||
if ( w < width ) w = width;
|
||||
if ( h < (height+dblh) ) h = height + dblh;
|
||||
delete m_doubleBuffer;
|
||||
m_doubleBuffer = new wxBitmap( w, h );
|
||||
m_doubleBuffer = new wxBitmap;
|
||||
m_doubleBuffer->CreateScaled( w, h, wxBITMAP_SCREEN_DEPTH, scaleFactor );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user