72 const int c_fileDefSize = 18;
73 const int c_gitDefSize = 16;
75 const int c_fileDefSize = 22;
76 const int c_gitDefSize = 16;
79 auto getBundle = [&](
BITMAPS aBmp,
int aDefSize )
83 const int c_padding = 1;
84 wxVector<wxBitmap> bmps;
86 for(
double scale : { 1.0, 1.25, 1.5, 1.75, 2.0, 3.0 } )
88 int size = aDefSize *
scale;
89 int paddedSize = size + c_padding * 2 *
scale;
91 wxBitmap bmp = scaled.GetBitmap( wxDefaultSize );
92 wxBitmap padded( paddedSize, paddedSize, 32 );
96 wxMemoryDC dc( padded );
97 dc.DrawBitmap( bmp, c_padding *
scale, c_padding *
scale );
100 bmps.push_back( padded );
103 return wxBitmapBundle::FromBitmaps( bmps );
109 wxVector<wxBitmapBundle> images;
139 images.push_back( getBundle(
BITMAPS::zip, c_fileDefSize ) );
146#if wxCHECK_VERSION( 3, 3, 0 ) || defined( __WXMAC__ )
147 wxVector<wxBitmapBundle> stateImages;
148 stateImages.push_back( wxBitmapBundle( wxBitmap( c_gitDefSize, c_gitDefSize ) ) );
156 stateImages.push_back( wxBitmapBundle( wxBitmap( c_gitDefSize, c_gitDefSize ) ) );
158 SetStateImages( stateImages );
161 wxBitmap blank_bitmap( c_gitDefSize, c_gitDefSize );
185 wxTreeItemIdValue cookie;
186 wxTreeItemId child = GetFirstChild( aParentId, cookie );
188 while( child.IsOk() )
190 aItems.push_back( child );
192 child = GetNextChild( aParentId, cookie );
wxBitmapBundle KiBitmapBundleDef(BITMAPS aBitmap, int aDefHeight)
Constructs and returns a bitmap bundle for the given icon ID, with the default bitmap size being aDef...
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...