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:
parent
41ce9ae1b0
commit
c90e98dcb6
@ -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;
|
||||
|
||||
|
@ -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
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user