From 79b71cf4ff7ae4121c92a50b6c1dc4da9d7d063d Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sun, 23 Dec 2018 22:13:43 +0100 Subject: [PATCH] Scale bitmap to wxPropertyGrid's row height By design only bitmaps lower than row height are displayed within the cells. Because on every platform default row height can vary so bitmap has to be explicitly scaled to the row height to ensure that it will be initially displayed on every platform. Closes #18310. --- samples/propgrid/propgrid.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/propgrid/propgrid.cpp b/samples/propgrid/propgrid.cpp index d323873cf1..49ff46bbb0 100644 --- a/samples/propgrid/propgrid.cpp +++ b/samples/propgrid/propgrid.cpp @@ -1157,7 +1157,8 @@ void FormMain::PopulateWithStandardItems () // Set test information for cells in columns 3 and 4 // (reserve column 2 for displaying units) wxPropertyGridIterator it; - wxBitmap bmp = wxArtProvider::GetBitmap(wxART_FOLDER); + int bmpH = pg->GetGrid()->GetRowHeight() - 2; + wxBitmap bmp = wxArtProvider::GetBitmap(wxART_FOLDER, wxART_OTHER, wxSize(bmpH, bmpH)); for ( it = pg->GetGrid()->GetIterator(); !it.AtEnd();