use different image for pressed button state

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-02-21 00:10:56 +00:00
parent 7cf3223a80
commit 89448b5dd7

View File

@@ -155,10 +155,6 @@ bool wxDropdownButton::Create(wxWindow *parent,
pos, wxDefaultSize, BTN_FLAGS, validator) )
return false;
#if (BTNFLAGS & wxBU_AUTODRAW ) == 0
m_windowStyle |= wxBU_AUTODRAW;
#endif
const wxSize sz = GetSize();
int w = chkBmp.GetWidth(),
h = chkBmp.GetHeight();
@@ -196,8 +192,15 @@ void wxDropdownButton::DoMoveWindow(int x, int y, int w, int h)
wxBitmap bmp(bw, bh);
dc.SelectObject(bmp);
wxRendererNative::Get().DrawComboBoxDropButton(this, dc, wxRect(0,0,bw, bh));
wxRect r(0,0,bw, bh);
wxRendererNative& renderer = wxRendererNative::Get();
renderer.DrawComboBoxDropButton(this, dc, r);
SetBitmapLabel(bmp);
wxBitmap bmpSel(bw, bh);
dc.SelectObject(bmpSel);
renderer.DrawComboBoxDropButton(this, dc, r, wxCONTROL_PRESSED);
SetBitmapSelected(bmpSel);
}
wxBitmapButton::DoMoveWindow(x, y, w, h);