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 );
95 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;
138 images.push_back( getBundle(
BITMAPS::zip, c_fileDefSize ) );
145#if wxCHECK_VERSION( 3, 3, 0 ) || defined( __WXMAC__ )
146 wxVector<wxBitmapBundle> stateImages;
147 stateImages.push_back( wxBitmapBundle( wxBitmap( c_gitDefSize, c_gitDefSize ) ) );
155 stateImages.push_back( wxBitmapBundle( wxBitmap( c_gitDefSize, c_gitDefSize ) ) );
157 SetStateImages( stateImages );
160 wxBitmap blank_bitmap( c_gitDefSize, c_gitDefSize );
184 wxTreeItemIdValue cookie;
185 wxTreeItemId child = GetFirstChild( aParentId, cookie );
187 while( child.IsOk() )
189 aItems.push_back( child );
191 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...