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

@@ -162,6 +162,30 @@ TEST_CASE("BitmapBundle::ArtProvider", "[bmpbundle][art]")
b = wxArtProvider::GetBitmapBundle(wxART_INFORMATION, wxART_MENU, size);
CHECK( b.IsOk() );
CHECK( b.GetDefaultSize() == size );
#if wxUSE_ARTPROVIDER_TANGO
// Tango art provider is supposed to use 16px for the default size of the
// menu and button images and 24px for all the other ones, but we need to
// choose the client kind for which the current platform doesn't define its
// own default/fallback size to be able to test for it, i.e. this is the
// client for which GetNativeSizeHint() of the native art provider returns
// wxDefaultSize.
const wxArtClient artClient =
#ifdef __WXMSW__
wxART_TOOLBAR
#else
wxART_LIST
#endif
;
// We also need to use an image provided by Tango but not by the native art
// provider, but here we can at least avoid the platform checks by using an
// image not provided by any native providers.
b = wxArtProvider::GetBitmapBundle(wxART_REFRESH, artClient);
CHECK( b.IsOk() );
CHECK( b.GetDefaultSize() == wxSize(24, 24) );
#endif // wxUSE_ARTPROVIDER_TANGO
}
// This test only makes sense for the ports that actually support scaled