Changed ComboDropDown button under GTK+ so that it

will create a transparent button. This works for
    the date control, but should be generalized somehow.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2005-02-28 14:38:47 +00:00
parent 7ab378223c
commit 83dc6964f0
3 changed files with 21 additions and 26 deletions

View File

@@ -194,12 +194,33 @@ void wxDropdownButton::DoMoveWindow(int x, int y, int w, int h)
wxRect r(0,0,bw, bh);
wxRendererNative& renderer = wxRendererNative::Get();
#ifdef __WXGTK__
wxColour magic(255,0,255);
dc.SetBrush( wxBrush( magic ) );
dc.SetPen( *wxTRANSPARENT_PEN );
dc.DrawRectangle(0,0,bw,bh);
renderer.DrawComboBoxDropButton(this, dc, r);
wxMask *mask = new wxMask( bmp, magic );
bmp.SetMask( mask );
#else
renderer.DrawComboBoxDropButton(this, dc, r);
#endif
SetBitmapLabel(bmp);
wxBitmap bmpSel(bw, bh);
dc.SelectObject(bmpSel);
#ifdef __WXGTK__
dc.SetBrush( wxBrush( magic ) );
dc.SetPen( *wxTRANSPARENT_PEN );
dc.DrawRectangle(0,0,bw,bh);
renderer.DrawComboBoxDropButton(this, dc, r, wxCONTROL_PRESSED);
mask = new wxMask( bmpSel, magic );
bmpSel.SetMask( mask );
#else
renderer.DrawComboBoxDropButton(this, dc, r, wxCONTROL_PRESSED);
#endif
SetBitmapSelected(bmpSel);
}