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