X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0847e36eff0512bf3c50c01e8d9dcff5e693ada5..7f08aa6ce9c7d079b247963a3cb66193780603a3:/src/generic/odcombo.cpp diff --git a/src/generic/odcombo.cpp b/src/generic/odcombo.cpp index 1d912e19c0..e70047106d 100644 --- a/src/generic/odcombo.cpp +++ b/src/generic/odcombo.cpp @@ -760,6 +760,11 @@ wxSize wxVListBoxComboPopup::GetAdjustedSize( int minWidth, int prefHeight, int height = maxHeight; int totalHeight = GetTotalHeight(); // + 3; + + // Take borders into account on Mac or scrollbars always appear +#if defined(__WXMAC__) + totalHeight += 2; +#endif if ( height >= totalHeight ) { height = totalHeight; @@ -1084,7 +1089,20 @@ void wxOwnerDrawnComboBox::OnDrawItem( wxDC& dc, { if ( flags & wxODCB_PAINTING_CONTROL ) { - dc.DrawText( GetValue(), + wxString text; + + if ( !ShouldUseHintText() ) + { + text = GetValue(); + } + else + { + text = GetHint(); + wxColour col = wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT); + dc.SetTextForeground(col); + } + + dc.DrawText( text, rect.x + GetMargins().x, (rect.height-dc.GetCharHeight())/2 + rect.y ); }