67 const int c_fileDefSize = 18;
68 const int c_gitDefSize = 16;
70 const int c_fileDefSize = 22;
71 const int c_gitDefSize = 16;
74 auto getBundle = [&](
BITMAPS aBmp,
int aDefSize )
78 const int c_padding = 1;
79 wxVector<wxBitmap> bmps;
81 for(
double scale : { 1.0, 1.25, 1.5, 1.75, 2.0, 3.0 } )
83 int size = aDefSize *
scale;
84 int paddedSize = size + c_padding * 2 *
scale;
86 wxBitmap bmp = scaled.GetBitmap( wxDefaultSize );
87 wxBitmap padded( paddedSize, paddedSize, 32 );
91 wxMemoryDC dc( padded );
92 dc.DrawBitmap( bmp, c_padding *
scale, c_padding *
scale );
95 bmps.push_back( padded );
98 return wxBitmapBundle::FromBitmaps( bmps );
104 wxVector<wxBitmapBundle> images;
134 images.push_back( getBundle(
BITMAPS::zip, c_fileDefSize ) );
141#if wxCHECK_VERSION( 3, 3, 0 ) || defined( __WXMAC__ )
142 wxVector<wxBitmapBundle> stateImages;
143 stateImages.push_back( wxBitmapBundle( wxBitmap( c_gitDefSize, c_gitDefSize ) ) );
151 stateImages.push_back( wxBitmapBundle( wxBitmap( c_gitDefSize, c_gitDefSize ) ) );
153 SetStateImages( stateImages );
156 wxBitmap blank_bitmap( c_gitDefSize, c_gitDefSize );
180 wxTreeItemIdValue cookie;
181 wxTreeItemId child = GetFirstChild( aParentId, cookie );
183 while( child.IsOk() )
185 aItems.push_back( child );
187 child = GetNextChild( aParentId, cookie );
wxBitmapBundle KiBitmapBundleDef(BITMAPS aBitmap, int aDefHeight)
Construct and return a bitmap bundle for the given icon ID, with the default bitmap size being aDefHe...
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...