X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/39191cbfdb6af2c0afabd98afa0802d0af9402e7..404b319a85dadd7decf7a5a5331020520031a41c:/src/generic/odcombo.cpp diff --git a/src/generic/odcombo.cpp b/src/generic/odcombo.cpp index 01118eafb7..451026384f 100644 --- a/src/generic/odcombo.cpp +++ b/src/generic/odcombo.cpp @@ -725,6 +725,8 @@ void wxVListBoxComboPopup::CalcWidths() // wxWindow::GetTextExtent (assuming same dc is used // for all calls, as we do here). wxClientDC dc(m_combo); + if ( !m_useFont.IsOk() ) + m_useFont = m_combo->GetFont(); dc.SetFont(m_useFont); for ( i=0; i 0 ) + { + wxOwnerDrawnComboBox* odc = const_cast(this); + best.x = odc->GetWidestItemWidth(); + // TODO: this class may also have GetHightestItemHeight() and + // GetHightestItem() methods, and so set the whole (edit part + arrow) + // control's height according with this max height, not only max width. + } + + return GetSizeFromTextSize(best.x); +} + void wxOwnerDrawnComboBox::OnDrawBackground(wxDC& dc, const wxRect& rect, int WXUNUSED(item),