Adjust bitmap size to the wxPropertyGrid cell size

Bitmap inserted into the wxPG cell should be automatically rescaled while
drawing to let us using bitmaps of any size.
This commit is contained in:
Artur Wieczorek
2020-04-12 17:28:14 +02:00
parent 1a3dc3fae6
commit b039ff1822
2 changed files with 20 additions and 9 deletions

View File

@@ -1149,8 +1149,7 @@ void FormMain::PopulateWithStandardItems ()
// Set test information for cells in columns 3 and 4
// (reserve column 2 for displaying units)
wxPropertyGridIterator it;
int bmpH = pg->GetGrid()->GetRowHeight() - 2;
wxBitmap bmp = wxArtProvider::GetBitmap(wxART_FOLDER, wxART_OTHER, wxSize(bmpH, bmpH));
wxBitmap bmp = wxArtProvider::GetBitmap(wxART_FOLDER);
for ( it = pg->GetGrid()->GetIterator();
!it.AtEnd();