Added wxGTK wxBitmapComboBox::DoGetBestSize() implementation that takes bitmap size into acccount.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli 2009-07-18 08:33:55 +00:00
parent 41ce9ae1b0
commit c90e98dcb6
2 changed files with 15 additions and 0 deletions

View File

@ -133,6 +133,8 @@ protected:
virtual void GTKCreateComboBoxWidget();
virtual void GTKInsertComboBoxTextItem( unsigned int n, const wxString& text );
virtual wxSize DoGetBestSize() const;
wxSize m_bitmapSize;
int m_bitmapCellIndex;

View File

@ -164,6 +164,19 @@ GdkWindow *wxBitmapComboBox::GTKGetWindow(wxArrayGdkWindows& windows) const
return wxChoice::GTKGetWindow(windows);
}
wxSize wxBitmapComboBox::DoGetBestSize() const
{
wxSize best = wxComboBox::DoGetBestSize();
int delta = GetBitmapSize().y - GetCharHeight();
if ( delta > 0 )
{
best.y += delta;
CacheBestSize(best);
}
return best;
}
// ----------------------------------------------------------------------------
// Item manipulation
// ----------------------------------------------------------------------------