mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
2x banner images!
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
// XXX comex: scale support
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: src/generic/treectlg.cpp
|
||||
// Purpose: generic tree control implementation
|
||||
|
14
Externals/wxWidgets3/src/osx/imaglist.cpp
vendored
14
Externals/wxWidgets3/src/osx/imaglist.cpp
vendored
@ -73,16 +73,16 @@ int wxImageList::Add( const wxIcon &bitmap )
|
||||
|
||||
int wxImageList::Add( const wxBitmap &bitmap )
|
||||
{
|
||||
wxASSERT_MSG( (bitmap.GetWidth() >= m_width && bitmap.GetHeight() == m_height)
|
||||
wxASSERT_MSG( (bitmap.GetScaledWidth() >= m_width && bitmap.GetScaledHeight() == m_height)
|
||||
|| (m_width == 0 && m_height == 0),
|
||||
wxT("invalid bitmap size in wxImageList: this might work ")
|
||||
wxT("on this platform but definitely won't under Windows.") );
|
||||
|
||||
// Mimic behaviour of Windows ImageList_Add that automatically breaks up the added
|
||||
// bitmap into sub-images of the correct size
|
||||
if (m_width > 0 && bitmap.GetWidth() > m_width && bitmap.GetHeight() >= m_height)
|
||||
if (m_width > 0 && bitmap.GetScaledWidth() > m_width && bitmap.GetScaledHeight() >= m_height)
|
||||
{
|
||||
int numImages = bitmap.GetWidth() / m_width;
|
||||
int numImages = bitmap.GetScaledWidth() / m_width;
|
||||
for (int subIndex = 0; subIndex < numImages; subIndex++)
|
||||
{
|
||||
wxRect rect(m_width * subIndex, 0, m_width, m_height);
|
||||
@ -97,8 +97,8 @@ int wxImageList::Add( const wxBitmap &bitmap )
|
||||
|
||||
if (m_width == 0 && m_height == 0)
|
||||
{
|
||||
m_width = bitmap.GetWidth();
|
||||
m_height = bitmap.GetHeight();
|
||||
m_width = bitmap.GetScaledWidth();
|
||||
m_height = bitmap.GetScaledHeight();
|
||||
}
|
||||
|
||||
return m_images.GetCount() - 1;
|
||||
@ -275,8 +275,8 @@ bool wxImageList::GetSize( int index, int &width, int &height ) const
|
||||
else
|
||||
{
|
||||
wxBitmap *bm = static_cast< wxBitmap* >(obj ) ;
|
||||
width = bm->GetWidth();
|
||||
height = bm->GetHeight();
|
||||
width = bm->GetScaledWidth();
|
||||
height = bm->GetScaledHeight();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user