X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/befee9b7138622434d29acf09427d69a1e7c68ee..1c9919467b422edf561753db25605bc7aa293b55:/src/msw/bmpcbox.cpp diff --git a/src/msw/bmpcbox.cpp b/src/msw/bmpcbox.cpp index 6ae9044a2d..8e6496094a 100644 --- a/src/msw/bmpcbox.cpp +++ b/src/msw/bmpcbox.cpp @@ -183,6 +183,20 @@ wxBitmapComboBox::~wxBitmapComboBox() Clear(); } +wxSize wxBitmapComboBox::DoGetBestSize() const +{ + wxSize best = wxComboBox::DoGetBestSize(); + wxSize bitmapSize = GetBitmapSize(); + + wxCoord useHeightBitmap = EDIT_HEIGHT_FROM_CHAR_HEIGHT(bitmapSize.y); + if ( best.y < useHeightBitmap ) + { + best.y = useHeightBitmap; + CacheBestSize(best); + } + return best; +} + // ---------------------------------------------------------------------------- // Item manipulation // ---------------------------------------------------------------------------- @@ -294,7 +308,7 @@ bool wxBitmapComboBox::OnAddBitmap(const wxBitmap& bitmap) return true; } - + return false; } @@ -351,7 +365,7 @@ bool wxBitmapComboBox::MSWOnDraw(WXDRAWITEMSTRUCT *item) if ( pos == -1 ) return FALSE; - int flags = 0; + int flags = 0; if ( lpDrawItem->itemState & ODS_COMBOBOXEDIT ) flags |= wxODCB_PAINTING_CONTROL; if ( lpDrawItem->itemState & ODS_SELECTED )