fix the size of bitmaps we create (re-closes #4563) [backport of r50895 from trunk]

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@58156 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-01-16 19:12:20 +00:00
parent 56511a5418
commit dfc2f3defa

View File

@@ -837,18 +837,8 @@ wxBitmap BitmapComboBoxWidgetsPage::QueryBitmap(wxString* pStr)
wxBitmap BitmapComboBoxWidgetsPage::CreateBitmap(const wxColour& colour)
{
int ch = m_combobox->GetBitmapSize().y;
int h0 = ch - 5;
long w = ch;
long h = ch;
if ( w <= 0 )
w = h0 - 1;
if ( h <= 0 )
h = h0;
if ( h > ch )
h = ch;
const int w = 10,
h = 10;
wxMemoryDC dc;
wxBitmap bmp(w, h);
@@ -859,11 +849,11 @@ wxBitmap BitmapComboBoxWidgetsPage::CreateBitmap(const wxColour& colour)
wxBrush magicBrush(magic);
dc.SetBrush(magicBrush);
dc.SetPen(*wxTRANSPARENT_PEN);
dc.DrawRectangle(0,0,bmp.GetWidth(),bmp.GetHeight());
dc.DrawRectangle(0, 0, w, h);
// Draw image content
dc.SetBrush(wxBrush(colour));
dc.DrawCircle(h/2,h/2+1,(h/2));
dc.DrawCircle(h/2, h/2+1, h/2);
dc.SelectObject(wxNullBitmap);