Fix simulated toggle in OS X wxToolBar wiht HiDPI bitmaps
Use scaled size and scale factor when creating wxMemoryDC so that the modified output bitmap has same physical dimensions as the source one. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78089 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -563,9 +563,10 @@ void wxToolBarTool::UpdateImages()
|
||||
|
||||
if ( CanBeToggled() )
|
||||
{
|
||||
int w = m_bmpNormal.GetWidth();
|
||||
int h = m_bmpNormal.GetHeight();
|
||||
m_alternateBitmap = wxBitmap( w, h );
|
||||
int w = m_bmpNormal.GetScaledWidth();
|
||||
int h = m_bmpNormal.GetScaledHeight();
|
||||
m_alternateBitmap = wxBitmap();
|
||||
m_alternateBitmap.CreateScaled(w, h, -1, m_bmpNormal.GetScaleFactor());
|
||||
wxMemoryDC dc;
|
||||
|
||||
dc.SelectObject(m_alternateBitmap);
|
||||
|
Reference in New Issue
Block a user