X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/befee9b7138622434d29acf09427d69a1e7c68ee..44c2703fbf07a5685d1959f3f72d3ccf91a7f5db:/src/msw/bmpcbox.cpp?ds=sidebyside 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 )