fix the rendering of the icons on combobox

This commit is contained in:
Ocraftyone 2023-11-08 12:26:23 -05:00
parent 6d149e0698
commit 413e8751c0
No known key found for this signature in database
GPG key ID: 85836ED21AD4D125

View file

@ -194,7 +194,7 @@ void TextInput::render(wxDC& dc)
// start draw // start draw
wxPoint pt = {5, 0}; wxPoint pt = {5, 0};
if (icon.bmp().IsOk()) { if (icon.bmp().IsOk()) {
wxSize szIcon = icon.GetSize(); wxSize szIcon = get_preferred_size(icon.bmp(), m_parent);
pt.y = (size.y - szIcon.y) / 2; pt.y = (size.y - szIcon.y) / 2;
dc.DrawBitmap(icon.get_bitmap(), pt); dc.DrawBitmap(icon.get_bitmap(), pt);
pt.x += szIcon.x + 0; pt.x += szIcon.x + 0;