X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9d9e32a07a99f1388833013a51fef65a682ad5bc..025357ca4feb7a7f4cfdc85cd1ff3c37b300c2b1:/src/generic/datectlg.cpp diff --git a/src/generic/datectlg.cpp b/src/generic/datectlg.cpp index f44aec61dd..35469e70eb 100644 --- a/src/generic/datectlg.cpp +++ b/src/generic/datectlg.cpp @@ -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); @@ -470,6 +473,8 @@ bool wxDatePickerCtrlGeneric::Enable(bool enable) { if ( m_cal ) m_cal->Hide(); + if ( m_popup ) + m_popup->Hide(); } if ( m_btn )