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:
@@ -133,6 +133,8 @@ protected:
|
|||||||
virtual void GTKCreateComboBoxWidget();
|
virtual void GTKCreateComboBoxWidget();
|
||||||
virtual void GTKInsertComboBoxTextItem( unsigned int n, const wxString& text );
|
virtual void GTKInsertComboBoxTextItem( unsigned int n, const wxString& text );
|
||||||
|
|
||||||
|
virtual wxSize DoGetBestSize() const;
|
||||||
|
|
||||||
wxSize m_bitmapSize;
|
wxSize m_bitmapSize;
|
||||||
int m_bitmapCellIndex;
|
int m_bitmapCellIndex;
|
||||||
|
|
||||||
|
@@ -164,6 +164,19 @@ GdkWindow *wxBitmapComboBox::GTKGetWindow(wxArrayGdkWindows& windows) const
|
|||||||
return wxChoice::GTKGetWindow(windows);
|
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
|
// Item manipulation
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user