Restore the old default size of Tango art provider bitmaps

The default size of the bitmaps created from bitmap bundles returned by
the Tango art provider for the client strings different from wxART_MENU
and wxART_BUTTON was changed from 24x24 to 16x16 in 766fefeb34 (Use SVG
instead of PNGs in tango art provider, 2022-01-27), see #22067, without
any real need and perhaps even non intentionally at all.

Restore the old default size to restore the old behaviour.

See #22189.
This commit is contained in:
Vadim Zeitlin
2022-03-20 21:54:33 +01:00
parent 7b8d40666b
commit d9a48edc81
2 changed files with 30 additions and 2 deletions

View File

@@ -209,8 +209,12 @@ wxTangoArtProvider::CreateBitmapBundle(const wxArtID& id,
wxSize sizeDef = size != wxDefaultSize ? size : GetSizeHint(client);
if (sizeDef == wxDefaultSize)
{
// We really need some default size here.
sizeDef = wxSize(16, 16);
// We really need some default size here, so keep using the same
// sizes we used for PNG-based implementation we had before.
if ( client == wxART_MENU || client == wxART_BUTTON )
sizeDef = wxSize(16, 16);
else
sizeDef = wxSize(24, 24);
}
return wxBitmapBundle::FromSVG(entry.data, entry.len, sizeDef);
}